GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use bitwise OR to define flag masks (#20044) · react/react@37cb732

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/react-reconciler/src
    • ReactFiberFlags.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/react-reconciler/src/ReactFiberFlags.js‎

Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberFlags.js
+15-14Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ export const Hydrating = /* */ 0b0000000010000000000;
3030
export const HydratingAndUpdate = /* */ 0b0000000010000000100;
3131
export const Visibility = /* */ 0b0000000100000000000;
3232

33-
// Passive & Update & Callback & Ref & Snapshot
34-
export const LifecycleEffectMask = /* */ 0b0000000001110100100;
33+
export const LifecycleEffectMask = Passive | Update | Callback | Ref | Snapshot;
3534

36-
// Union of all host effects
35+
// Union of all commit flags (flags with the lifetime of a particular commit)
3736
export const HostEffectMask = /* */ 0b0000000111111111111;
3837

3938
// These are not really side effects, but we still reuse this field.
@@ -50,7 +49,14 @@ export const ForceUpdateForLegacySuspense = /* */ 0b0001000000000000000;
5049
// and instead rely on the static flag as a signal that there may be cleanup work.
5150
export const PassiveStatic = /* */ 0b0010000000000000000;
5251

53-
// Union of side effect groupings as pertains to subtreeFlags
52+
// These flags allow us to traverse to fibers that have effects on mount
53+
// without traversing the entire tree after every commit for
54+
// double invoking
55+
export const MountLayoutDev = /* */ 0b0100000000000000000;
56+
export const MountPassiveDev = /* */ 0b1000000000000000000;
57+
58+
// Groups of flags that are used in the commit phase to skip over trees that
59+
// don't contain effects, by checking subtreeFlags.
5460

5561
export const BeforeMutationMask =
5662
Snapshot |
@@ -62,17 +68,12 @@ export const BeforeMutationMask =
6268
Deletion | Visibility
6369
: 0);
6470

65-
export const MutationMask = /* */ 0b0000000110010011110;
66-
export const LayoutMask = /* */ 0b0000000000010100100;
67-
export const PassiveMask = /* */ 0b0000000001000001000;
71+
export const MutationMask =
72+
Placement | Update | Deletion | ContentReset | Ref | Hydrating | Visibility;
73+
export const LayoutMask = Update | Callback | Ref;
74+
export const PassiveMask = Passive | Deletion;
6875

6976
// Union of tags that don't get reset on clones.
7077
// This allows certain concepts to persist without recalculting them,
7178
// e.g. whether a subtree contains passive effects or portals.
72-
export const StaticMask = /* */ 0b0010000000000000000;
73-
74-
// These flags allow us to traverse to fibers that have effects on mount
75-
// without traversing the entire tree after every commit for
76-
// double invoking
77-
export const MountLayoutDev = /* */ 0b0100000000000000000;
78-
export const MountPassiveDev = /* */ 0b1000000000000000000;
79+
export const StaticMask = PassiveStatic;

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.