dillon1000/react

Commit

Extract layout effects to separate functions

There's a lot of duplicated code between commitLayoutEffectOnFiber and the
"reappear layout effects" path that happens when an Offscreen tree goes from
hidden back to visible. I'm going to refactor these to share more of the same
code. As a first step, this extracts the shared parts into separate functions.

This may not save much on code size because Closure will likely inline some of
it, anyway, but it makes it harder for the two paths to accidentally diverge.
Browse files
Changed paths2 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberCommitWork.new.js ModifiedM packages/react-reconciler/src/ReactFiberCommitWork.old.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…