Returns the controller of the route that was intercepted during navigation, or null if such route wasn't intercepted.
route
null
Route params.
Data loaded by a route.
A router context.
The route to intercept.
The controller of the intercepted route, or null if the route wasn't intercepted.
const fooController = useInterceptedRoute(fooRoute);fooController !== null && <RouteOutlet controller={fooController} />// Navigate to the route to intercept it.router.navigate(fooRoute); Copy
const fooController = useInterceptedRoute(fooRoute);fooController !== null && <RouteOutlet controller={fooController} />// Navigate to the route to intercept it.router.navigate(fooRoute);
RouteOutlet
Returns the controller of the
route
that was intercepted during navigation, ornull
if such route wasn't intercepted.