Closed stephen776 closed 1 year ago
At the moment, hybrid routes are part of a separate branch I'm working on. I plan to have it ready for Remix Conf Europe next week.
However, looking at your routes, I don't think those are valid. You are using pathless routes (_
prefix) all the way down, so Remix won't be able to determine the correct route based on the URL. They would all match /
URL.
If you got rid of the _
on all the routes, then hybrid routes should work just fine.
routes/
dashboard/
list/
_index.tsx <- /dashboard/list
update/
_index.tsx <- /dashboard/update
OR simplify as
routes/
dashboard/
list.route.tsx <- /dashboard/list
update.route.tsx <- /dashboard/update
dashboard.css
logo.png
The .route
suffix would let you "tag" a file as a route without having to create a folder/_index.tsx file.
Ok awesome.. ya the _ are typo in my example. Thanks for the reply
Any new info on hybrid routes?
Have you tried hybrid routes? What do you think of them?
Have you tried hybrid routes? What do you think of them?
Yep! Just migrated my project last night. I think it’s fantastic. Exactly what I was hoping for. Thanks for all the work you’ve done here!
Based on the conversation on the Remix Flat Routes RFC discussion - is it correct that this library supports "hybrid routes" out of the box? I do not see anything referencing this in the README.
I was attempting to use a hybrid of a "layout route" directory with normal flat route subdirectories. Does this work out of the box?
Something like this: