File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11import React , {
22 useRef ,
33 useMemo ,
4- useLayoutEffect ,
54 useImperativeHandle ,
65 ReactNode ,
76 RefObject ,
@@ -10,6 +9,7 @@ import {
109 is ,
1110 toArray ,
1211 useForceUpdate ,
12+ useIsomorphicLayoutEffect ,
1313 useOnce ,
1414 each ,
1515 OneOrMore ,
@@ -136,7 +136,7 @@ export function useTransition(
136136 // The "onRest" callbacks need a ref to the latest transitions.
137137 const usedTransitions = useRef < TransitionState [ ] | null > ( null )
138138 const prevTransitions = usedTransitions . current
139- useLayoutEffect ( ( ) => {
139+ useIsomorphicLayoutEffect ( ( ) => {
140140 usedTransitions . current = transitions
141141 } )
142142
@@ -311,7 +311,7 @@ export function useTransition(
311311
312312 useImperativeHandle ( ref , ( ) => api )
313313
314- useLayoutEffect (
314+ useIsomorphicLayoutEffect (
315315 ( ) => {
316316 each ( changes , ( { phase, payload } , t ) => {
317317 t . phase = phase
You can’t perform that action at this time.
0 commit comments