File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed
packages/react-reconciler/src Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ import {readContext} from './ReactFiberNewContext.new';
4949import {
5050 Update as UpdateEffect ,
5151 Passive as PassiveEffect ,
52+ PassiveStatic as PassiveStaticEffect ,
5253} from './ReactFiberFlags' ;
5354import {
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,
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ import {readContext} from './ReactFiberNewContext.old';
4949import {
5050 Update as UpdateEffect ,
5151 Passive as PassiveEffect ,
52+ PassiveStatic as PassiveStaticEffect ,
5253} from './ReactFiberFlags' ;
5354import {
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,
Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ import {
132132 HostEffectMask ,
133133 Hydrating ,
134134 HydratingAndUpdate ,
135+ StaticMask ,
135136} from './ReactFiberFlags' ;
136137import {
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 {
Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ import {
132132 HostEffectMask ,
133133 Hydrating ,
134134 HydratingAndUpdate ,
135+ StaticMask ,
135136} from './ReactFiberFlags' ;
136137import {
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 {
You can’t perform that action at this time.
0 commit comments