Replies: 2 comments 2 replies
-
You can try and get these utilities: react-router/packages/react-router/lib/server-runtime/routes.ts Lines 19 to 56 in 04a6272 They're not exposed in public API, so you'll need to copy-paste these to your code. const matched = marchRoute(createRoutes(serverBuild.routes), new URL(request.url).pathname, serverBuild.basename) I think I'll open an issue and ask maintainers to add some public utilities to get current route metadata. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
In what context are you trying to match? |
Beta Was this translation helpful? Give feedback.
-
in v6,i have a array of type RouteObject[],and i can use
matchesRoutes(routes,url)
,but in v7,there isRouteConfig
, so how to usematchRoutes
withRouteConfig
?Beta Was this translation helpful? Give feedback.
All reactions