From 1acb0295a660125989c8f719538cfb6c3d7044be Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Fri, 13 Nov 2020 09:30:30 -0600 Subject: [PATCH] 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. --- .eslintrc.js | 9 ++------- packages/react-reconciler/src/ReactFiber.new.js | 4 ++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 6dd119127ff47..715c6eb96074a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -116,12 +116,7 @@ module.exports = { 'react-internal/no-cross-fork-types': [ ERROR, { - old: [ - 'firstEffect', - 'nextEffect', - // Disabled because it's also used by the Hook type. - // 'lastEffect', - ], + old: [], new: [], }, ], @@ -190,7 +185,7 @@ module.exports = { { files: [ 'packages/react-native-renderer/**/*.js', - 'packages/react-transport-native-relay/**/*.js' + 'packages/react-transport-native-relay/**/*.js', ], globals: { nativeFabricUIManager: true, diff --git a/packages/react-reconciler/src/ReactFiber.new.js b/packages/react-reconciler/src/ReactFiber.new.js index 0dcff2f776fb4..73b0f358932b5 100644 --- a/packages/react-reconciler/src/ReactFiber.new.js +++ b/packages/react-reconciler/src/ReactFiber.new.js @@ -141,6 +141,10 @@ function FiberNode( // Effects this.flags = NoFlags; + this.nextEffect = null; + + this.firstEffect = null; + this.lastEffect = null; this.subtreeFlags = NoFlags; this.deletions = null;