Skip to content
/ rc-pure Public

a react package that improves render performance by reducing re-render component, fast and easy use!

License

Notifications You must be signed in to change notification settings

lh0x00/rc-pure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rc-pure

npm version npm downloads github issues greenkeeper status

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

import pure from 'rc-pure'

const config = {
  updateByKeys: ['name'],
}

const Component = ({ name = 'Hieu' }) => (<div>hello, {name}</div>)

// with config
const Pure = pure(config)(Component)

// simple
const Pure = 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

About

a react package that improves render performance by reducing re-render component, fast and easy use!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published