@jswork/mixin-react-on-change

1.0.1 • Public • Published

mixin-react-on-change

OnChange mixin for react.

installation

npm install -S @jswork/mixin-react-on-change

bugs

  • [ ] state when formData.xx_field

usage

// create file in: mixins/on-change.js
export default require('@jswork/mixin-react-on-change').default(nx.$app);


// <input onChange={this.onChangeToState.bind(this, 'user.nickname')}>
// <input onChange={this.onChangeToState.bind(this, 'user.phone')}>

// state:
{
  user:{
    nickname:'',
    phone:''
  }
}

Readme

Keywords

Package Sidebar

Install

npm i @jswork/mixin-react-on-change

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

6.11 kB

Total Files

4

Last publish

Collaborators

  • afeiship