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 — Add PassiveStatic to trees with passive effects · react/react@19e15a3

File tree

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

‎packages/react-reconciler/src/ReactFiberHooks.new.js‎

Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberHooks.new.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import {readContext} from './ReactFiberNewContext.new';
4949
import {
5050
Update as UpdateEffect,
5151
Passive as PassiveEffect,
52+
PassiveStatic as PassiveStaticEffect,
5253
} from './ReactFiberFlags';
5354
import {
5455
HasEffect as HookHasEffect,
@@ -1304,7 +1305,7 @@ function mountEffect(
13041305
}
13051306
}
13061307
return mountEffectImpl(
1307-
UpdateEffect | PassiveEffect,
1308+
UpdateEffect | PassiveEffect | PassiveStaticEffect,
13081309
HookPassive,
13091310
create,
13101311
deps,
Collapse file

‎packages/react-reconciler/src/ReactFiberHooks.old.js‎

Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberHooks.old.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import {readContext} from './ReactFiberNewContext.old';
4949
import {
5050
Update as UpdateEffect,
5151
Passive as PassiveEffect,
52+
PassiveStatic as PassiveStaticEffect,
5253
} from './ReactFiberFlags';
5354
import {
5455
HasEffect as HookHasEffect,
@@ -1304,7 +1305,7 @@ function mountEffect(
13041305
}
13051306
}
13061307
return mountEffectImpl(
1307-
UpdateEffect | PassiveEffect,
1308+
UpdateEffect | PassiveEffect | PassiveStaticEffect,
13081309
HookPassive,
13091310
create,
13101311
deps,
Collapse file

‎packages/react-reconciler/src/ReactFiberWorkLoop.new.js‎

Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberWorkLoop.new.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ import {
132132
HostEffectMask,
133133
Hydrating,
134134
HydratingAndUpdate,
135+
StaticMask,
135136
} from './ReactFiberFlags';
136137
import {
137138
NoLanePriority,
@@ -1781,7 +1782,7 @@ function completeUnitOfWork(unitOfWork: Fiber): void {
17811782
// Skip both NoWork and PerformedWork tags when creating the effect
17821783
// list. PerformedWork effect is read by React DevTools but shouldn't be
17831784
// committed.
1784-
if (flags > PerformedWork) {
1785+
if ((flags & ~StaticMask) > PerformedWork) {
17851786
if (returnFiber.lastEffect !== null) {
17861787
returnFiber.lastEffect.nextEffect = completedWork;
17871788
} else {
Collapse file

‎packages/react-reconciler/src/ReactFiberWorkLoop.old.js‎

Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberWorkLoop.old.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ import {
132132
HostEffectMask,
133133
Hydrating,
134134
HydratingAndUpdate,
135+
StaticMask,
135136
} from './ReactFiberFlags';
136137
import {
137138
NoLanePriority,
@@ -1781,7 +1782,7 @@ function completeUnitOfWork(unitOfWork: Fiber): void {
17811782
// Skip both NoWork and PerformedWork tags when creating the effect
17821783
// list. PerformedWork effect is read by React DevTools but shouldn't be
17831784
// committed.
1784-
if (flags > PerformedWork) {
1785+
if ((flags & ~StaticMask) > PerformedWork) {
17851786
if (returnFiber.lastEffect !== null) {
17861787
returnFiber.lastEffect.nextEffect = completedWork;
17871788
} else {

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.