Interface RedirectResult

A result that can be returned from a route action to request a redirect to a different location.

interface RedirectResult {
    redirect: Readonly<{
        from: string;
        params: Readonly<Record<string, ParamValue>>;
        pathname: string;
    }>;
}

Properties

Properties

redirect: Readonly<{
    from: string;
    params: Readonly<Record<string, ParamValue>>;
    pathname: string;
}>

The path info to redirect to.

Type declaration

  • from: string

    The original path from which the redirect is happening.

  • params: Readonly<Record<string, ParamValue>>

    An object containing URL parameters related to the redirect.

  • pathname: string

    The pathname of the new URL to which the redirect is directed.