React Corsair - v0.0.10
    Preparing search index...

    Function useInterceptedRoute

    • Returns the controller of the route that was intercepted during navigation, or null if such route wasn't intercepted.

      Type Parameters

      • Params extends Dict

        Route params.

      • Data

        Data loaded by a route.

      • Context

        A router context.

      Parameters

      Returns null | RouteController<Params, Data, Context>

      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);