Navigate
interface INavigateProps {
to: To;
replace?: boolean;
state?: any;
statusCode?: HttpCode.CODE_301 | HttpCode.CODE_302;
}
type To = string | Partial<Path>;
interface Path {
pathname: string;
search: string;
hash: string;
}
A <Navigate> element changes the current location when it is rendered. It's a component wrapper around useNavigate, and accepts all the same arguments as props and defaults to replacing latest state in history.stack rather than pushing.