dillon1000/react
Commit
Browse files [Fiber] Some setState related issues (#8010)
* Use the memoized props/state from the workInProgress We don't want to use the "current" props/state because if we have started work, then pause and continue then we'll have the newer props/state on it already. If it is not a resume, it should be the same as current. * Deprioritize setState within a deprioritized tree Currently we flag the path to a setState as a higher priority than "offscreen". When we reconcile down this tree we bail out if it is a hidden node. However, in the case that node is already completed we don't hit that bail out path. We end up doing the work immediately which ends up committing that part of the tree at a higher priority. This ensures that we don't let a deprioritized subtree get reconciled at a higher priority. * Bump idx in unit test This proves that this number is actually deprioritized.
Changed paths3 files
First-parent comparisonsrc/renderers/shared/fiber/ReactFiberBeginWork.js ModifiedM src/renderers/shared/fiber/__tests__/ReactIncremental-test.js ModifiedM src/renderers/shared/fiber/__tests__/ReactIncrementalSideEffects-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…