Catch-all routes
Edit this pageCatch-all routes are used to match any URL that does not match any other route in the application. This is useful for displaying a 404 page or redirecting to a specific route when a user enters an invalid URL.
To create a catch-all route, place a route with a asteriks *
as the path at the end of the route list.
Optionally, you can name the parameter to access the unmatched part of the URL.
Now, if a user navigates to a URL that does not match /home
or /about
, the NotFound
component will be rendered.