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/framework/react/guide/file-based-routing.md
+2-37Lines changed: 2 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,43 +87,8 @@ It's extremely likely that a 100% directory or flat route structure won't be the
87
87
88
88
Both flat and directory routes can be mixed together to create a route tree that uses the best of both worlds where it makes sense.
89
89
90
-
## Virtual File Routes
91
-
92
-
> We'd like to thank the Remix team for [pioneering the concept of virtual file routes](https://www.youtube.com/watch?v=fjTX8hQTlEc&t=730s). We've taken inspiration from their work and adapted it to work with TanStack Router's existing file-based route-tree generation.
93
-
94
-
Virtual file routes are a powerful concept that allows you to build a route tree programmatically using code that references real files in your project. This can be useful if:
95
-
96
-
- You have an existing route organization that you want to keep.
97
-
- You want to customize the location of your route files.
98
-
- You want to completely override TanStack Router's file-based route generation and build your own convention.
99
-
100
-
Here's a quick example of using virtual file routes to map a route tree to a set of real files in your project:
For more information on how to configure virtual file routes, see the [Virtual File Routes](./virtual-file-routes.md) guide.
90
+
> [!TIP]
91
+
> If you find the need to customize the location of your route files or completely override the discovery of routes, you can use [Virtual File Routes](./virtual-file-routes.md) to programmatically build your route tree while still getting the awesome benefits of file-based routing.
Please be sure to check out the full documentation links above for each type of route tree, or just proceed to the next section to get started with file-based routing.
0 commit comments