0.1.2 • Published 6 years ago

react-auto-update v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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

  1. Install npm install react-auto-update --save

  2. Add react-auto-update in component top:

@reactAutoUpdate

but this package depend on immutable.js
Done!