dillon1000/react

Commit

Use Passive flag to schedule onPostCommit (#19862)

Instead of calling `onPostCommit` in a separate phase, we can fire
them during the same traversal as the rest of the passive effects.

This works because effects are executed depth-first. So by the time we
reach a Profiler node, we'll have already executed all the effects in
its subtree.
Browse files
Changed paths3 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberBeginWork.new.js ModifiedM packages/react-reconciler/src/ReactFiberCommitWork.new.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.new.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…