dillon1000/react
Commit
Browse files Bugfix: Effects should never have higher than normal priority (#16257)
* Bugfix: Priority when effects are flushed early The priority of passive effects is supposed to be the same as the priority of the render. This fixes a bug where the priority is sometimes wrong if the effects are flushed early. But the priority should really never be higher than Normal Priority. I'll change that in the next commit. * Effects never have higher than normal priority Effects currently have the same priority as the render that spawns them. This changes the behavior so that effects always have normal priority, or lower if the render priority is lower (e.g. offscreen prerendering). The implementation is a bit awkward because of the way `renderRoot`, `commitRoot`, and `flushPassiveEffects` are split. This is a known factoring problem that I'm planning to address once 16.9 is released.
Changed paths3 files
First-parent comparisonpackages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedM packages/react-reconciler/src/SchedulerWithReactIntegration.js ModifiedM packages/react-reconciler/src/__tests__/ReactSchedulerIntegration-test.internal.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…