0.1.2 • Published 6 years ago
react-auto-update v0.1.2
Before
in component
class xxxx extends React.Component {
...
shouldComponentUpdate(){
if(...){
return true or false
}
}
}
After
Component only with local imports
import reactAutoUpdate from 'react-auto-update'
@reactAutoUpdate
class xxxx extends React.Component {
...
}
Installation
Install
npm install react-auto-update --save
Add react-auto-update in component top:
@reactAutoUpdate
but this package depend on immutable.js
Done!