Skip to content

Latest commit

 

History

History
35 lines (29 loc) · 507 Bytes

README.md

File metadata and controls

35 lines (29 loc) · 507 Bytes

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!