@@ -32,7 +32,6 @@ import type {
32
32
} from "./router/router" ;
33
33
import { IDLE_BLOCKER } from "./router/router" ;
34
34
import type {
35
- AgnosticRouteMatch ,
36
35
ParamParseKey ,
37
36
Params ,
38
37
PathMatch ,
@@ -445,7 +444,7 @@ export function useRoutesImpl(
445
444
`useRoutes() may be used only in the context of a <Router> component.`
446
445
) ;
447
446
448
- let { navigator, static : isStatic } = React . useContext ( NavigationContext ) ;
447
+ let { navigator } = React . useContext ( NavigationContext ) ;
449
448
let { matches : parentMatches } = React . useContext ( RouteContext ) ;
450
449
let routeMatch = parentMatches [ parentMatches . length - 1 ] ;
451
450
let parentParams = routeMatch ? routeMatch . params : { } ;
@@ -532,17 +531,7 @@ export function useRoutesImpl(
532
531
remainingPathname = "/" + segments . slice ( parentSegments . length ) . join ( "/" ) ;
533
532
}
534
533
535
- // Use data router matches when available to avoid another match routes call.
536
- // Skip this during SSR because the matches coming in from StaticHandlerContext
537
- // might be UI agnostic and we want the matches from the createStaticRouter's
538
- // routes
539
- let matches =
540
- ! isStatic &&
541
- dataRouterState &&
542
- dataRouterState . matches &&
543
- dataRouterState . matches . length > 0
544
- ? ( dataRouterState . matches as AgnosticRouteMatch < string , RouteObject > [ ] )
545
- : matchRoutes ( routes , { pathname : remainingPathname } ) ;
534
+ let matches = matchRoutes ( routes , { pathname : remainingPathname } ) ;
546
535
547
536
if ( ENABLE_DEV_WARNINGS ) {
548
537
warning (
0 commit comments