File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
import React , {
2
2
useRef ,
3
3
useMemo ,
4
- useLayoutEffect ,
5
4
useImperativeHandle ,
6
5
ReactNode ,
7
6
RefObject ,
@@ -10,6 +9,7 @@ import {
10
9
is ,
11
10
toArray ,
12
11
useForceUpdate ,
12
+ useIsomorphicLayoutEffect ,
13
13
useOnce ,
14
14
each ,
15
15
OneOrMore ,
@@ -136,7 +136,7 @@ export function useTransition(
136
136
// The "onRest" callbacks need a ref to the latest transitions.
137
137
const usedTransitions = useRef < TransitionState [ ] | null > ( null )
138
138
const prevTransitions = usedTransitions . current
139
- useLayoutEffect ( ( ) => {
139
+ useIsomorphicLayoutEffect ( ( ) => {
140
140
usedTransitions . current = transitions
141
141
} )
142
142
@@ -311,7 +311,7 @@ export function useTransition(
311
311
312
312
useImperativeHandle ( ref , ( ) => api )
313
313
314
- useLayoutEffect (
314
+ useIsomorphicLayoutEffect (
315
315
( ) => {
316
316
each ( changes , ( { phase, payload } , t ) => {
317
317
t . phase = phase
You can’t perform that action at this time.
0 commit comments