rc-pure
a react package that improves render performance by reducing re-render component, fast and easy use!
reference
rc-pure-component
a wrapper use pure component wrap stateless functional components to class use pure component to reduce re-render. read more
install
# use npm $ npm install rc-pure # or yarn $ yarn add rc-pure
usage
const config = updateByKeys: 'name' const Component = <div>hello name</div> // with configconst Pure = Component // simpleconst Pure = Component
documents
config
name | type | description |
---|---|---|
compare | Func | (optional) the function used to calculate the change value. default: lodash.isEqual |
updateByKeys | Array | (optional) Only update when these values change. default: undefined |