The Redirect type is used to represent a redirect action in TanStack Router.
export type Redirect = {
statusCode?: number
throw?: any
headers?: HeadersInit
} & NavigateOptionsexport type Redirect = {
statusCode?: number
throw?: any
headers?: HeadersInit
} & NavigateOptionsThe Redirect object accepts/contains the following properties:
Since Redirect extends NavigateOptions, it also supports navigation properties:
Important: For external URLs, always use the href property instead of to. The to property is designed for internal navigation within your application.