dillon1000/react
Commit
Browse files [WIP] Warn in dev if shouldComponentUpdate is defined on PureComponent (#9240)
* Add test for React.PureComponent * Add warning when shouldComponentUpdate is declared in a PureComponent * Add actionable warning * Add warning in Fiber * Format added code by running yarn prettier * Move pure sCU check to checkClassInstance That way it warns before the component updates
Changed paths4 files
First-parent comparisonscripts/fiber/tests-passing.txt ModifiedM src/isomorphic/modern/class/__tests__/ReactPureComponent-test.js ModifiedM src/renderers/shared/fiber/ReactFiberClassComponent.js ModifiedM src/renderers/shared/stack/reconciler/ReactCompositeComponent.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…