File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
packages/react-reconciler/src Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -748,14 +748,16 @@ function updateOffscreenComponent(
748
748
749
749
subtreeRenderLanes = mergeLanes ( prevState . baseLanes , renderLanes ) ;
750
750
751
+ let prevCachePool = null ;
751
752
if ( enableCache ) {
752
753
// If the render that spawned this one accessed the cache pool, resume
753
754
// using the same cache. Unless the parent changed, since that means
754
755
// there was a refresh.
755
- const prevCachePool = prevState . cachePool ;
756
- pushTransition ( workInProgress , prevCachePool , null ) ;
756
+ prevCachePool = prevState . cachePool ;
757
757
}
758
758
759
+ pushTransition ( workInProgress , prevCachePool , null ) ;
760
+
759
761
// Since we're not hidden anymore, reset the state
760
762
workInProgress . memoizedState = null ;
761
763
} else {
Original file line number Diff line number Diff line change @@ -748,14 +748,16 @@ function updateOffscreenComponent(
748
748
749
749
subtreeRenderLanes = mergeLanes ( prevState . baseLanes , renderLanes ) ;
750
750
751
+ let prevCachePool = null ;
751
752
if ( enableCache ) {
752
753
// If the render that spawned this one accessed the cache pool, resume
753
754
// using the same cache. Unless the parent changed, since that means
754
755
// there was a refresh.
755
- const prevCachePool = prevState . cachePool ;
756
- pushTransition ( workInProgress , prevCachePool , null ) ;
756
+ prevCachePool = prevState . cachePool ;
757
757
}
758
758
759
+ pushTransition ( workInProgress , prevCachePool , null ) ;
760
+
759
761
// Since we're not hidden anymore, reset the state
760
762
workInProgress . memoizedState = null ;
761
763
} else {
You can’t perform that action at this time.
0 commit comments