main
Branches
main (6.26.2)dev
Versions
6.26.2v4/5.xv3.x
replace

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 Declaration

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.

Docs and examples CC 4.0