Skip to content

Commit 99dc7a9

Browse files
committed
...and fix it again
1 parent 6e1e3df commit 99dc7a9

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,7 @@ export function createWorkInProgress(current: Fiber, pendingProps: any): Fiber {
289289

290290
// Reset all effects except static ones.
291291
// Static effects are not specific to a render.
292-
// FIXME: I intentionally broke this to confirm that it triggers a warning
293-
// in dev. We should not reset the whole `flags` bitmask; we should preserve
294-
// the static flags.
295-
// workInProgress.flags = current.flags & StaticMask;
296-
workInProgress.flags = NoFlags;
297-
292+
workInProgress.flags = current.flags & StaticMask;
298293
workInProgress.childLanes = current.childLanes;
299294
workInProgress.lanes = current.lanes;
300295

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,7 @@ export function createWorkInProgress(current: Fiber, pendingProps: any): Fiber {
289289

290290
// Reset all effects except static ones.
291291
// Static effects are not specific to a render.
292-
// FIXME: I intentionally broke this to confirm that it triggers a warning
293-
// in dev. We should not reset the whole `flags` bitmask; we should preserve
294-
// the static flags.
295-
// workInProgress.flags = current.flags & StaticMask;
296-
workInProgress.flags = NoFlags;
297-
292+
workInProgress.flags = current.flags & StaticMask;
298293
workInProgress.childLanes = current.childLanes;
299294
workInProgress.lanes = current.lanes;
300295

0 commit comments

Comments
 (0)