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 }) {
295295
296296To 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:
297297
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 ` |
304303
305304## Escaping Special Characters
306305
Original file line number Diff line number Diff line change @@ -304,12 +304,16 @@ const { "*": splat } = params;
304304You can also use a splat to catch requests that don't match any route:
305305
306306``` 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" ;
308312
309313export default [
310314 index (" ./home.tsx" ),
311315 route (" about" , " ./about.tsx" ),
312- route (" *" , " ./404.tsx" )
316+ route (" *" , " ./404.tsx" ),
313317] satisfies RouteConfig ;
314318```
315319
You can’t perform that action at this time.
0 commit comments