You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/router/configuration.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,3 +88,31 @@ export const App = () => (
88
88
Here, we are assuming that your server has returned HTML with a script tag that has declared the `__SSR_STATE__` object. For more info on this please checkout [this section](#how-to-use-the-router-on-the-server) on using the router on the server.
89
89
90
90
**NOTE:** When the `resourceData` prop is set, the router will **not** request resources on mount.
91
+
92
+
## Adding a 404 Route
93
+
94
+
The router will render nothing if no routes match the current location. This is useful if you want to render a 404 page. To do this, simply add a route with an empty string `""` to your routes array.
95
+
96
+
**NOTE:** You can not include the path property for the 404 route when using JS. However when using TS you must include the path property and set it to an empty string.
0 commit comments