Skip to main content

Advanced

๐Ÿ“„๏ธ Redirects

The Redirect route class sets up static redirect routes. You can also use it to create JSX ` elements for use with makeRouteConfig. This class takes from and to properties and an optional status property. from should be a path pattern as for normal routes above. to can be either a path pattern or a function. If it is a path pattern, the router will populate path parameters appropriately. If it is a function, it will receive the same routing state object as getComponent and getData, as described above. status is used to set the HTTP status code when redirecting from the server, and defaults to 302` if it is not specified.