Replies: 1 comment 2 replies
-
Since you are using Your current route structure looks like this. <Routes>
<Route file="root.tsx">
<Route index file="routes/_index.tsx" />
<Route path=":aaa" file="routes/$aaa.tsx">
<Route path="xxx/:bbb" file="routes/$aaa.xxx.$bbb.tsx" />
<Route path=":bbb" file="routes/$aaa.$bbb.tsx" />
</Route>
</Route>
</Routes>
If you don't want $aaa to be a parent layout, then you need to let Remix know by putting a trailing Now you'll see that all the routes nest under root. <Routes>
<Route file="root.tsx">
<Route path=":aaa/xxx/:bbb" file="routes/$aaa_.xxx.$bbb.tsx" />
<Route path=":aaa/:bbb" file="routes/$aaa_.$bbb.tsx" />
<Route index file="routes/_index.tsx" />
<Route path=":aaa" file="routes/$aaa.tsx" />
</Route>
</Routes> https://remix.run/docs/en/main/pages/v2#file-system-route-convention |
Beta Was this translation helpful? Give feedback.
-
What version of Remix are you using?
1.17.1
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
https://stackblitz.com/edit/remix-run-remix-qx5leh?file=app%2Froutes%2F_index.tsx
From the home page, click to each different URL, then click Home
Expected Behavior
Three separate routes are defined:
Each route's default export component renders text that shows which component was rendered.
I would expect clicking the three different URLs in the home page to render each of the three components.
Actual Behavior
Only one component is ever rendered: the default export from $aaa.tsx
Note that each route's loader is CORRECTLY called: in the console, each LOADER message corresponds to the route for the link clicked.
Beta Was this translation helpful? Give feedback.
All reactions