本页还没有译文
本页 14 段还没译成简体中文,下面显示的是英文原文。replace
还没翻译译自英文(reactrouter.com)本页 14 段都还没译
replace
Framework Data
Summary
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.
import { replace } from "react-router";
export async function loader() {
return replace("/new-location");
}Params
url
The URL to redirect to.
init
The status code or a ResponseInit object to be included in the response.
Returns
A Response
object with the redirect status and Location
header.
AI 翻译查看英文原文