Replies: 5 comments 6 replies
-
This. Colocation should be an exception, not the norm. I will definitely switch to |
Beta Was this translation helpful? Give feedback.
-
|
It's been a year, any status on Thanks |
Beta Was this translation helpful? Give feedback.
-
|
I've migrated 3 production (small to medium sized) apps to the And now I find the needs for colocation, but I'm just adding Here's my typical use case: Now, I just want to get rid of |
Beta Was this translation helpful? Give feedback.
-
|
Sorry to hijack this discussion but it's not working for me on my side here is my folder structure. I am currently on the latest version of remix. It does not show anything on the expected routes using node version @remix-run/node: ^2.8.1
@remix-run/react: ^2.8.1
@remix-run/serve: ^2.8.1
remix-flat-route: ^0.6.4
vite: ^5.1.0 |
Beta Was this translation helpful? Give feedback.
-
|
Hey @kiliman, now that we have RRv7, any plans for this? I believe the hybrid approach is mature enough that we could drop the |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Remix has published the new
v2routing convention and is a more strict flat-routes convention. Ryan doesn't appear interested in incorporating any of the more enhanced features into the core library.I think it would be a good idea to create a new project called
remix-hybrid-routes.One of the main goals would be to be flexible but simplify the convention.
Requirements
All routes can use
.or/as route separators, whichever you prefer. So you can have:a.b.c.d.tsxora/b/c/d.tsxor anywhere between.So how does that affect colocation? In
v2andremix-flat-routesa folder automatically opts-in to colocation. So you can no longer use folders just for route organization. That is why I introduced the+suffix for folders. They let you use folders for organization instead of colocation.With
remix-hybrid-routes, I think it should be the opposite. Whereasremix-flat-routeshad to maintain compatibility with the flat routes spec,remix-hybrid-routescan do whatever we like. I feel that organization is much more common than colocation.All index routes (default route for a path) will be named
_indexlike inv2._layoutin a folder will be the layout for all routes in that folder (including child routes)Use the
+suffix to specify the contents of this folder are colocated. The route file isindex.tsx, any other file is ignored.Parent layouts will look for nearest
_layoutfile, so no need for the trailing_on the$userId.editroute. It will simply nest underusers/_layout.tsxAnyway, I'd appreciate any comments.
Beta Was this translation helpful? Give feedback.
All reactions