Type alias ToRoute<T>

ToRoute<T>: ((value: T, params?: Params, replace?: boolean) => Route<T>)

Type Parameters

  • T extends string = string

    See RouteConfig for details.

Type declaration

    • (value: T, params?: Params, replace?: boolean): Route<T>
    • Function to generate a Route.

      Parameters

      • value: T

        the route value.

      • Optional params: Params

        the route parameters.

      • Optional replace: boolean

        indicates whether to replace the entry in the browser's history instead of appending. This is useful, for example, when redirecting from a route that the user was not allowed to access.

      Returns Route<T>

Generated using TypeDoc