dillon1000/react
Commit
Browse files Allow performWork to be called recursively
Currently we assume that performWork is never called recursively. Ideally that is the case. We shouldn't rely on recursion anywhere in Fiber. However, to support the use of syncUpdates as an opt-in to forced- synchronous updates, we need the ability to call performWork recursively. At the beginning of performWork, the state of the scheduler is saved; before exiting, that state is restored, so that the scheduler can continue where it left off. I've decided to use local variables to stash the previous state. We could also store them in a record and push it to a stack, but this approach has the advantage of being isolated to performWork.
Changed paths1 file
First-parent comparisonsrc/renderers/shared/fiber/ReactFiberScheduler.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…