Skip to content

Commit 3b009b4

Browse files
authored
Make RefStatic and LayoutStatic the same bit (facebook#31965)
Refs are basically just fancy Layout Effects. These are conceptually the same thing and are always visited together so they don't need to be different flags. Whenever we disappear/reappear Offscreen content we need to do both Refs and Layout Effects. This is just indicating which phase needs to be visited and these are always the same phase.
1 parent 220dece commit 3b009b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-reconciler/src/ReactFiberFlags.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ export const Forked = /* */ 0b0000000100000000000000000000
6666
// This enables us to defer more work in the unmount case,
6767
// since we can defer traversing the tree during layout to look for Passive effects,
6868
// and instead rely on the static flag as a signal that there may be cleanup work.
69-
export const RefStatic = /* */ 0b0000001000000000000000000000;
7069
export const LayoutStatic = /* */ 0b0000010000000000000000000000;
70+
export const RefStatic = LayoutStatic;
7171
export const PassiveStatic = /* */ 0b0000100000000000000000000000;
7272
export const MaySuspendCommit = /* */ 0b0001000000000000000000000000;
7373

0 commit comments

Comments
 (0)