--- title: replace --- # replace [MODES: framework, data] ## Summary [Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.replace.html) A redirect response that will perform a `history.replaceState` instead of a `history.pushState` for client-side navigation redirects. Sets the status code and the `Location` header. Defaults to "302 Found". ## Signature ```tsx replace(url, init): Response ``` ## Params ### url [modes: framework, data] _No documentation_ ### init [modes: framework, data] _No documentation_