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 — Don't visit passive effects during layout phase (#19809) · react/react@84558c6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/react-reconciler/src
    • ReactFiberHooks.new.js
    • ReactFiberWorkLoop.new.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
+3-9Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ function mountEffect(
12411241
}
12421242
}
12431243
return mountEffectImpl(
1244-
UpdateEffect | PassiveEffect | PassiveStaticEffect,
1244+
PassiveEffect | PassiveStaticEffect,
12451245
HookPassive,
12461246
create,
12471247
deps,
@@ -1258,12 +1258,7 @@ function updateEffect(
12581258
warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber);
12591259
}
12601260
}
1261-
return updateEffectImpl(
1262-
UpdateEffect | PassiveEffect,
1263-
HookPassive,
1264-
create,
1265-
deps,
1266-
);
1261+
return updateEffectImpl(PassiveEffect, HookPassive, create, deps);
12671262
}
12681263

12691264
function mountLayoutEffect(
@@ -1615,8 +1610,7 @@ function mountOpaqueIdentifier(): OpaqueIDType | void {
16151610
const setId = mountState(id)[1];
16161611

16171612
if ((currentlyRenderingFiber.mode & BlockingMode) === NoMode) {
1618-
currentlyRenderingFiber.flags |=
1619-
UpdateEffect | PassiveEffect | PassiveStaticEffect;
1613+
currentlyRenderingFiber.flags |= PassiveEffect | PassiveStaticEffect;
16201614
pushEffect(
16211615
HookHasEffect | HookPassive,
16221616
() => {
Collapse file

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

Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberWorkLoop.new.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2623,7 +2623,7 @@ function flushPassiveMountEffects(firstChild: Fiber): void {
26232623
flushPassiveMountEffects(fiber.child);
26242624
}
26252625

2626-
if ((fiber.flags & Update) !== NoFlags) {
2626+
if ((fiber.flags & Passive) !== NoFlags) {
26272627
setCurrentDebugFiberInDEV(fiber);
26282628
commitPassiveEffectOnFiber(fiber);
26292629
resetCurrentDebugFiberInDEV();

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.