dillon1000/react

Commit

Update shallowCompare to accept nextContext (#6661)

* Update shallowCompare to accept nextContext

Across our application we are using immutable objects as properties and thus using shallowCompare for all our {{shouldComponentUpdate}}.  Because of this children with contextTypes don't get updates when the context on the parent changes.  Adding an additional comparison for context (when it is provided) fixes this problem.

* Remove the undefined check

* Add nextContext
Browse files
Changed paths2 files
First-parent comparison
M src/addons/ReactComponentWithPureRenderMixin.js ModifiedM src/addons/shallowCompare.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…