🧪 Experiment with remix style routing#726
Closed
just-be-dev wants to merge 2 commits into
Closed
Conversation
Collaborator
|
In Remix a route file can export a We could maybe hack the plugin to do it similarly, but it doesn't seem worth the effort if we intend to eventually do in Remix anyway. Also worth waiting a few weeks to see what the data loading API looks like in RR, maybe there will be something more like this in there. |
Contributor
Author
|
Oh, nice, yeah. Hopefully handle makes it into the new router config too, that'd be ideal. I'm going to close this b/c we obviously shouldn't merge it, but it's a nice reference if we ever want to revisit. |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is very rough so please ignore the awful, terrible, no-good things that I did to get it here, ha.
I'm using
vite-plugin-remix-routeswhich itself actually just hooks into@remix-run/devto do the bulk of the generation. So it's like very indirectly using parts of remix 😄. I made some updates to get stuff I needed so I've included a patch-package patch that's running the results of this PR: vjee/vite-plugin-remix-routes#2The breadcrumb stuff won't be working with these changes for obvious reasons. I'd say we could hack it into the remix routes plugin, but I'm wondering if we should just try to figure out some more standard-ish way of doing it.
It took me a while to map how our config works to the folder/file structure needed. It's kind of weird, honestly. I mean the good news is that there's a method to the madness which means there is inherent structure. There's docs I could point folks to to get a better understanding of what's happening here, but I don't think it's very intuitive.
Going through this exercise was educational though and I feel like I have a better appreciation for the benefits/drawbacks of remix and certainly a deeper understanding for how vite plugins work, ha. If we don't end up going in this direction (and I'm not certain if we should) then I think this'll at least help us inform some of the page structure on the other side.
Something like this maybe:
Or the more basic
Anyway, feel free to poke around and hit me up if you have questions