-
Hi since recommended way of defining routes in RR7 is using |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I either keep using the file route convention from Remix v2 or I like to organize route files like this: First
Then
The layouts will only have files app auth.tsx, app.tsx, landing.tsx and other layouts that will be shared. The [resource] is replaced with something like users, posts, comments, basically like a REST API, so inside you have an index to list them, a show for a detail, and new and edit to create/update. Then in In this convention the file doesn't relate to the URL, URLs are defined in This convention is similar to what frameworks like Ruby on Rails does. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for the response. Very interesting view. I like this approach. |
Beta Was this translation helpful? Give feedback.
I either keep using the file route convention from Remix v2 or I like to organize route files like this:
First
app/resources
for all resource routes (routes without UI) like API routes, webhooks, or other things. that are insideapp/resources
directly or inside other folders as needed.Then
app/views
for all routes with a UI where I organize it like