T
TanStack5mo ago
magic-amber

Does Start support Router's Virtual File Routing as well?

It seems like it might but I'm unsure
13 Replies
metropolitan-bronze
metropolitan-bronze5mo ago
yes
magic-amber
magic-amberOP5mo ago
awesome! is the starting point to use the TanStackRouterVite plugin and forgo things like __root.tsx?
metropolitan-bronze
metropolitan-bronze5mo ago
no just put the config under the tsr key in app.config.ts
magic-amber
magic-amberOP5mo ago
oh ok yeah i see virtualRouteConfig ... will __root.tsx still wrap that virtual config?
metropolitan-bronze
metropolitan-bronze5mo ago
what do you mean? you need to add a root to your virtual config whatever the name
metropolitan-bronze
metropolitan-bronze5mo ago
Virtual File Routes | TanStack Router React Docs
We'd like to thank the Remix team for . We've taken inspiration from their work and adapted it to work with TanStack Router's existing file-based route-tree generation. Virtual file routes are a power...
magic-amber
magic-amberOP5mo ago
right now in the tss docs the __root.tsx looks like the page shell with adding the <Scripts /> and other things then rendering {children} i was trying to understand how that works if i'm defining a virtual config
metropolitan-bronze
metropolitan-bronze5mo ago
which tss docs exactly? you would just create the same file but can name it whatever you like
metropolitan-bronze
metropolitan-bronze5mo ago
virtual file routes is just a way for you to define your own naming "convention" all other concepts stay the same
magic-amber
magic-amberOP5mo ago
oh could you add api routes as well with virtual-file-routes?
metropolitan-bronze
metropolitan-bronze5mo ago
hmm never tried probably not?
magic-amber
magic-amberOP5mo ago
ok!

Did you find this page helpful?