@@ -322,13 +322,14 @@ export function BrowserRouter({
322
322
action : history . action ,
323
323
location : history . location ,
324
324
} ) ;
325
+ let { v7_startTransition } = future || { } ;
325
326
let setState = React . useCallback (
326
327
( newState : { action : NavigationType ; location : Location } ) => {
327
- future && future . v7_startTransition && startTransitionImpl
328
+ v7_startTransition && startTransitionImpl
328
329
? startTransitionImpl ( ( ) => setStateImpl ( newState ) )
329
330
: setStateImpl ( newState ) ;
330
331
} ,
331
- [ setStateImpl , future ]
332
+ [ setStateImpl , v7_startTransition ]
332
333
) ;
333
334
334
335
React . useLayoutEffect ( ( ) => history . listen ( setState ) , [ history , setState ] ) ;
@@ -371,13 +372,14 @@ export function HashRouter({
371
372
action : history . action ,
372
373
location : history . location ,
373
374
} ) ;
375
+ let { v7_startTransition } = future || { } ;
374
376
let setState = React . useCallback (
375
377
( newState : { action : NavigationType ; location : Location } ) => {
376
- future && future . v7_startTransition && startTransitionImpl
378
+ v7_startTransition && startTransitionImpl
377
379
? startTransitionImpl ( ( ) => setStateImpl ( newState ) )
378
380
: setStateImpl ( newState ) ;
379
381
} ,
380
- [ setStateImpl , future ]
382
+ [ setStateImpl , v7_startTransition ]
381
383
) ;
382
384
383
385
React . useLayoutEffect ( ( ) => history . listen ( setState ) , [ history , setState ] ) ;
@@ -416,13 +418,14 @@ function HistoryRouter({
416
418
action : history . action ,
417
419
location : history . location ,
418
420
} ) ;
421
+ let { v7_startTransition } = future || { } ;
419
422
let setState = React . useCallback (
420
423
( newState : { action : NavigationType ; location : Location } ) => {
421
- future && future . v7_startTransition && startTransitionImpl
424
+ v7_startTransition && startTransitionImpl
422
425
? startTransitionImpl ( ( ) => setStateImpl ( newState ) )
423
426
: setStateImpl ( newState ) ;
424
427
} ,
425
- [ setStateImpl , future ]
428
+ [ setStateImpl , v7_startTransition ]
426
429
) ;
427
430
428
431
React . useLayoutEffect ( ( ) => history . listen ( setState ) , [ history , setState ] ) ;
0 commit comments