dillon1000/react
Commit
Browse files 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
Changed paths3 files
First-parent comparisonpackages/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 ModifiedPatch
Files changed
Rendering syntax-highlighted changes…