replace
This is a small wrapper around redirect
that will trigger a client-side redirect to the new location using history.replaceState
instead of history.pushState
.
type RedirectFunction = ( url: string, init?: number | ResponseInit ) => Response;
url
The URL to redirect to.
replace("/otherapp/login");
init
The status
or the Response options to be used in the response.