Skip to content

Commit

Permalink
Schedule Ref effect unconditionally on Offscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
sammy-SC committed Sep 21, 2022
1 parent d8611ac commit a8f7a96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions packages/react-reconciler/src/ReactFiberBeginWork.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,7 @@ function updateOffscreenComponent(
const prevState: OffscreenState | null =
current !== null ? current.memoizedState : null;

if (nextProps.mode === 'manual') {
markRef(current, workInProgress);
}
markRef(current, workInProgress);

if (
nextProps.mode === 'hidden' ||
Expand Down
4 changes: 1 addition & 3 deletions packages/react-reconciler/src/ReactFiberBeginWork.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,7 @@ function updateOffscreenComponent(
const prevState: OffscreenState | null =
current !== null ? current.memoizedState : null;

if (nextProps.mode === 'manual') {
markRef(current, workInProgress);
}
markRef(current, workInProgress);

if (
nextProps.mode === 'hidden' ||
Expand Down

0 comments on commit a8f7a96

Please sign in to comment.