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
Edit