dillon1000/react
Commit
Browse files Don't call componentDidUpdate if shouldComponentUpdate returns false
This fix relies on the props and state objects being different to know if we can avoid a componentDidUpdate. This is not a great solution because we actually want to use the new props/state object even if sCU returns false. That's the current semantics and it can actually be important because new rerenders that are able to reuse props objects are more likely to have the new props object so we won't be able to quickly bail out next time. I don't have a better idea atm though.
Changed paths2 files
First-parent comparisonsrc/renderers/shared/fiber/ReactFiberCompleteWork.js ModifiedM src/renderers/shared/fiber/__tests__/ReactIncremental-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…