about
a higher-order component to reduce render times quickly for lazy people like me!
install
# use npm $ npm install rc-pure-component # or yarn $ yarn add rc-pure-component
usage
before
const Component = <div>hello name</div>
after
// normalconst Component = // customconst shallowCompare = !prevProps === nextPropsconst Component =
compare
by default I use the calculation of fb, here:
const shallowCompare = !
alternatively, you can use the function of the lodash:
const shallowCompare = !