dillon1000/react

Commit

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.
Browse files
Changed paths2 files
First-parent comparison
M src/renderers/shared/fiber/ReactFiberCompleteWork.js ModifiedM src/renderers/shared/fiber/__tests__/ReactIncremental-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…