dillon1000/react

Commit

Context providers and consumers should bailout on already finished work (#12254)

* Context providers and consumers should bail-out on already finished work

Fixes bug where a consumer would re-render even if its props and context
had not changed.

* Encode output as JSON string

* Add weights to random action generator

* Add context to triangle fuzz tester

* Move bailouts to as early as possible

* Bailout if neither context value nor children haven't changed (sCU)

* Change prop type invariant to a DEV-only warning
Browse files
Changed paths3 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberBeginWork.js ModifiedM packages/react-reconciler/src/__tests__/ReactIncrementalTriangle-test.internal.js ModifiedM packages/react-reconciler/src/__tests__/ReactNewContext-test.internal.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…