-
I'm sure this has been asked before, but I wasn't sure how to look for it, and it remains the only awkward part of routing I'm encountering so far. The problem: I have an index page, like a dashboard, and some of my routes build on top of it, i.e. they share the same layout. I can't use an route("", "dashboard.tsx", [
route("another", "another.tsx"),
]) but is weird because the parent route is obviously an index route, so I'm not sure how index routes and routes with an empty string are different, besides the ability to have children. I could also create a layout route with an empty index route: layout("dashboard.tsx", [
index("dashboard-empty-index.tsx"),
route("another", "another.tsx"),
]) Here Obviously both of these solutions are workarounds, the latter feels better because I have an index route, but still wrong because it's empty. What is the "correct" way to solve this problem? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
route("", "dashboard.tsx", [
route("another", "another.tsx"),
]) This should allow |
Beta Was this translation helpful? Give feedback.
This should allow
/
to only render the dashboard and/another
to render both