shallow-compare
Stand alone shallowCompare for use in libraries that support shouldComponentUpdate
API
shallowCompare(instance, nextProps, nextState)
- instance (component instance) - the component's instance (
this
) - nextProps (object) - the next props
- nextState (object) - the next state
Example
{ superprops; thisstate = color: 'blue' } { return } { return <div>thisstatecolor</div> }