File tree 4 files changed +8
-4
lines changed
packages/react-reconciler/src
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';
49
49
import {
50
50
Update as UpdateEffect ,
51
51
Passive as PassiveEffect ,
52
+ PassiveStatic as PassiveStaticEffect ,
52
53
} from './ReactFiberFlags' ;
53
54
import {
54
55
HasEffect as HookHasEffect ,
@@ -1304,7 +1305,7 @@ function mountEffect(
1304
1305
}
1305
1306
}
1306
1307
return mountEffectImpl (
1307
- UpdateEffect | PassiveEffect ,
1308
+ UpdateEffect | PassiveEffect | PassiveStaticEffect ,
1308
1309
HookPassive,
1309
1310
create,
1310
1311
deps,
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ import {readContext} from './ReactFiberNewContext.old';
49
49
import {
50
50
Update as UpdateEffect ,
51
51
Passive as PassiveEffect ,
52
+ PassiveStatic as PassiveStaticEffect ,
52
53
} from './ReactFiberFlags' ;
53
54
import {
54
55
HasEffect as HookHasEffect ,
@@ -1304,7 +1305,7 @@ function mountEffect(
1304
1305
}
1305
1306
}
1306
1307
return mountEffectImpl (
1307
- UpdateEffect | PassiveEffect ,
1308
+ UpdateEffect | PassiveEffect | PassiveStaticEffect ,
1308
1309
HookPassive,
1309
1310
create,
1310
1311
deps,
Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ import {
132
132
HostEffectMask ,
133
133
Hydrating ,
134
134
HydratingAndUpdate ,
135
+ StaticMask ,
135
136
} from './ReactFiberFlags' ;
136
137
import {
137
138
NoLanePriority ,
@@ -1781,7 +1782,7 @@ function completeUnitOfWork(unitOfWork: Fiber): void {
1781
1782
// Skip both NoWork and PerformedWork tags when creating the effect
1782
1783
// list. PerformedWork effect is read by React DevTools but shouldn't be
1783
1784
// committed.
1784
- if ( flags > PerformedWork ) {
1785
+ if ( ( flags & ~ StaticMask ) > PerformedWork ) {
1785
1786
if ( returnFiber . lastEffect !== null ) {
1786
1787
returnFiber . lastEffect . nextEffect = completedWork ;
1787
1788
} else {
Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ import {
132
132
HostEffectMask ,
133
133
Hydrating ,
134
134
HydratingAndUpdate ,
135
+ StaticMask ,
135
136
} from './ReactFiberFlags' ;
136
137
import {
137
138
NoLanePriority ,
@@ -1781,7 +1782,7 @@ function completeUnitOfWork(unitOfWork: Fiber): void {
1781
1782
// Skip both NoWork and PerformedWork tags when creating the effect
1782
1783
// list. PerformedWork effect is read by React DevTools but shouldn't be
1783
1784
// committed.
1784
- if ( flags > PerformedWork ) {
1785
+ if ( ( flags & ~ StaticMask ) > PerformedWork ) {
1785
1786
if ( returnFiber . lastEffect !== null ) {
1786
1787
returnFiber . lastEffect . nextEffect = completedWork ;
1787
1788
} else {
You can’t perform that action at this time.
0 commit comments