@@ -32,7 +32,6 @@ import type {
3232} from "./router/router" ;
3333import { IDLE_BLOCKER } from "./router/router" ;
3434import type {
35- AgnosticRouteMatch ,
3635 ParamParseKey ,
3736 Params ,
3837 PathMatch ,
@@ -445,7 +444,7 @@ export function useRoutesImpl(
445444 `useRoutes() may be used only in the context of a <Router> component.`
446445 ) ;
447446
448- let { navigator, static : isStatic } = React . useContext ( NavigationContext ) ;
447+ let { navigator } = React . useContext ( NavigationContext ) ;
449448 let { matches : parentMatches } = React . useContext ( RouteContext ) ;
450449 let routeMatch = parentMatches [ parentMatches . length - 1 ] ;
451450 let parentParams = routeMatch ? routeMatch . params : { } ;
@@ -532,17 +531,7 @@ export function useRoutesImpl(
532531 remainingPathname = "/" + segments . slice ( parentSegments . length ) . join ( "/" ) ;
533532 }
534533
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 } ) ;
546535
547536 if ( ENABLE_DEV_WARNINGS ) {
548537 warning (
0 commit comments