Skip to main content

useRouteManifest

declare function useRouteManifest(children: RouteChildrenProps, rootFallback?: NonNullable<ReactNode> | null): RouteManifest;

Builds the RouteManifest for a <Route> tree once and memoizes it on its inputs (children, current pathname, parent route, fallback). <Routes> uses it to parse the tree and publishes the result via context so prefetching helpers can match against it.

You rarely need this directly — it is exported for parity with the other router primitives and for advanced setups that render a manifest outside of <Routes>.