File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 8
8
*/
9
9
10
10
import { findCurrentFiberUsingSlowPath } from 'react-reconciler/reflection' ;
11
+ import { getIsHydrating } from 'react-reconciler/src/ReactFiberHydrationContext' ;
11
12
import { get as getInstance } from 'shared/ReactInstanceMap' ;
12
13
import { addUserTimingListener } from 'shared/ReactFeatureFlags' ;
13
14
@@ -33,6 +34,8 @@ Object.assign(
33
34
} ,
34
35
// Perf experiment
35
36
addUserTimingListener,
37
+
38
+ getIsHydrating,
36
39
} ,
37
40
) ;
38
41
Original file line number Diff line number Diff line change @@ -484,6 +484,10 @@ function resetHydrationState(): void {
484
484
isHydrating = false ;
485
485
}
486
486
487
+ function getIsHydrating ( ) : boolean {
488
+ return isHydrating ;
489
+ }
490
+
487
491
export {
488
492
warnIfHydrating ,
489
493
enterHydrationState ,
@@ -494,4 +498,5 @@ export {
494
498
prepareToHydrateHostTextInstance ,
495
499
prepareToHydrateHostSuspenseInstance ,
496
500
popHydrationState ,
501
+ getIsHydrating ,
497
502
} ;
You can’t perform that action at this time.
0 commit comments