Skip to content

Commit ccf2440

Browse files
committed
Add firstEffect, et al fields to new fork
We need to bisect the changes to the recent commit phase refactor. To do this, we'll need to add back the effect list temporarily. This only adds them to the Fiber type so that the memory is the same as the old fork.
1 parent 2ae3590 commit ccf2440

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

.eslintrc.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,7 @@ module.exports = {
116116
'react-internal/no-cross-fork-types': [
117117
ERROR,
118118
{
119-
old: [
120-
'firstEffect',
121-
'nextEffect',
122-
// Disabled because it's also used by the Hook type.
123-
// 'lastEffect',
124-
],
119+
old: [],
125120
new: [],
126121
},
127122
],
@@ -190,7 +185,7 @@ module.exports = {
190185
{
191186
files: [
192187
'packages/react-native-renderer/**/*.js',
193-
'packages/react-transport-native-relay/**/*.js'
188+
'packages/react-transport-native-relay/**/*.js',
194189
],
195190
globals: {
196191
nativeFabricUIManager: true,

packages/react-reconciler/src/ReactFiber.new.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ function FiberNode(
141141

142142
// Effects
143143
this.flags = NoFlags;
144+
this.nextEffect = null;
145+
146+
this.firstEffect = null;
147+
this.lastEffect = null;
144148
this.subtreeFlags = NoFlags;
145149
this.deletions = null;
146150

@@ -805,6 +809,9 @@ export function assignFiberPropertiesInDEV(
805809
target.dependencies = source.dependencies;
806810
target.mode = source.mode;
807811
target.flags = source.flags;
812+
target.nextEffect = source.nextEffect;
813+
target.firstEffect = source.firstEffect;
814+
target.lastEffect = source.lastEffect;
808815
target.subtreeFlags = source.subtreeFlags;
809816
target.deletions = source.deletions;
810817
target.lanes = source.lanes;

0 commit comments

Comments
 (0)