File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -295,12 +295,11 @@ export async function serverLoader({ params }) {
295
295
296
296
To create a route that will match any requests that don't match other defined routes (such as a 404 page), create a file named ` $.tsx ` within your routes directory:
297
297
298
- | URL | Matched Route |
299
- | -------------------------------------------- | ------------------------ |
300
- | ` / ` | ` app/routes/_index.tsx ` |
301
- | ` /about ` | ` app/routes/about.tsx ` |
302
- | ` /any-invalid-path-will-match ` | ` app/routes/$.tsx ` |
303
-
298
+ | URL | Matched Route |
299
+ | ------------------------------ | ----------------------- |
300
+ | ` / ` | ` app/routes/_index.tsx ` |
301
+ | ` /about ` | ` app/routes/about.tsx ` |
302
+ | ` /any-invalid-path-will-match ` | ` app/routes/$.tsx ` |
304
303
305
304
## Escaping Special Characters
306
305
Original file line number Diff line number Diff line change @@ -304,12 +304,16 @@ const { "*": splat } = params;
304
304
You can also use a splat to catch requests that don't match any route:
305
305
306
306
``` ts filename=app/routes.ts lines=[6]
307
- import { type RouteConfig , route , index } from " @react-router/dev/routes" ;
307
+ import {
308
+ type RouteConfig ,
309
+ route ,
310
+ index ,
311
+ } from " @react-router/dev/routes" ;
308
312
309
313
export default [
310
314
index (" ./home.tsx" ),
311
315
route (" about" , " ./about.tsx" ),
312
- route (" *" , " ./404.tsx" )
316
+ route (" *" , " ./404.tsx" ),
313
317
] satisfies RouteConfig ;
314
318
```
315
319
You can’t perform that action at this time.
0 commit comments