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
{{ message }}
Repository navigation
Commit 1365c21
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/router/framework/react/routing/file-naming-conventions.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ File-based routing requires that you follow a few simple file naming conventions
20
20
> **💡 Remember:** The file-naming conventions for your project could be affected by what [options](../../../../api/file-based-routing.md) are configured.
21
21
22
22
> [!NOTE] To escape a trailing underscore, for example `/posts[_].tsx`, usage of the upgraded [Non-Nested Routes](../routing-concepts#non-nested-routes) is required.
23
+
23
24
## Dynamic Path Params
24
25
25
26
Dynamic path params can be used in both flat and directory routes to create routes that can match a dynamic segment of the URL path. Dynamic path params are denoted by the `$` character in the filename:
Copy file name to clipboardExpand all lines: docs/router/framework/react/routing/routing-concepts.md
+18-16Lines changed: 18 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -353,35 +353,37 @@ The following table shows which component will be rendered based on the URL:
353
353
- The `posts_.$postId.edit.tsx` route **does not share** the same `posts` prefix as the other routes and therefore will be treated as if it is a top-level route and will render `<PostEditor>`.
354
354
355
355
> [!NOTE]
356
-
> While using non-nested routes with file-based routing already works brilliantly, it might misbehave in certain conditions.
357
-
> Many of these limitations have already been addressed and will be released in the next major version of TanStack Router.
356
+
> While using non-nested routes with file-based routing already works brilliantly, it might misbehave in certain conditions.
357
+
> Many of these limitations have already been addressed and will be released in the next major version of TanStack Router.
358
358
>
359
359
> To start enjoying these benefits early, you can enable the experimental `nonNestedRoutes` flag in the router plugin configuration:
360
360
>
361
361
> ```ts
362
362
>exportdefaultdefineConfig({
363
-
> plugins: [
364
-
>tanstackRouter({
365
-
> // some config,
366
-
> experimental: {
367
-
> nonNestedRoutes: true,
368
-
> },
369
-
> }),
370
-
>],
363
+
> plugins: [
364
+
>tanstackRouter({
365
+
> // some config,
366
+
> experimental: {
367
+
> nonNestedRoutes: true,
368
+
> },
369
+
> }),
370
+
> ],
371
371
> })
372
372
>```
373
373
>
374
-
> *It is important to note that this does bring a slight change in how non-nested routes are referenced in useParams, useNavigate, etc. For this reason this has been released as a feature flag.
375
-
> The trailing underscore is no longer expected in the path:*
376
-
>
374
+
> _It is important to note that this does bring a slight change in how non-nested routes are referenced in useParams, useNavigate, etc. For this reason this has been released as a feature flag.
375
+
> The trailing underscore is no longer expected in the path:_
0 commit comments