dillon1000/react

Commit

[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
Browse files
Changed paths4 files
First-parent comparison
M scripts/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 Modified
Patch

Files changed

Rendering syntax-highlighted changes…