0.0.2 • Published 8 years ago

shallow-compare-without-functions v0.0.2

Weekly downloads
383
License
MIT
Repository
github
Last release
8 years ago

shallow-compare-without-functions

Travis

Just like React addons shallowCompare except it ignores functions. It's not uncommon to want to bind to a instance function or wrap and action creator. The problem with doing this is that even if the value props don't change, using a new function will trigger a re-render, making it a bad idea to use shallowCompare in that case. Additionally, the actual behavior of those functions almost never changes.

See this demo for an example.