replaceThis 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;
urlThe URL to redirect to.
replace("/otherapp/login");
initThe status or the Response options to be used in the response.