Skip to content

Commit

Permalink
Extract layout effects to separate functions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
acdlite committed Jul 19, 2022
1 parent 41287d4 commit 679eea3
Show file tree
Hide file tree
Showing 2 changed files with 588 additions and 606 deletions.
Loading

0 comments on commit 679eea3

Please sign in to comment.