I am trying the very basic implementation of routing but it doesn't work: on the index route I want to have a link that when clicked would go to /articles/1 and show the content of that route but instead I am seeing 404. Here is the link https://stackblitz.com/edit/remix-run-remix-duft3d?file=app%2Froutes%2F_index.tsx,app%2Froutes%2Farticles%2F1.tsx
#Struggling to implement basic routing
1 messages · Page 1 of 1 (latest)
Struggling to implement basic routing
In v2 routing it will be a file named articles.1.tsx, not a folder of articles
I am actually struggling with routing in remix. It always says not found. But yeah imma lookup what jacob sai. Thanks.
Each route is now an “import path”, so you can treat each a bit like its own module
That means instead of just having a file, you could have a folder with the same name an an index file inside of it. Any related components or assets your route needs can also be in that folder without messing up the routing
That makes it much easier to keep components next to the routes that need them, which makes for much more organized projects
But it also means you can’t use folders for grouping routes anymore
There is the remix-flat-routes package you can install to get a sort of hybrid solution, where you could have a + after your folder name to make it just group the routes