Replies: 2 comments 1 reply
-
Thanks for raising this issue here as a discussion 👍 I see two distinct ways of people using routing in Mint:
The A possible way of solving this could be to use the If that doesn't work, there are alternatives:
Also, we need to think about how the pages are served, for root domain applications the server needs to serve the Another aspect is when using the hash based routing, anchor jumping would cause unexpected behavior. |
Beta Was this translation helpful? Give feedback.
-
I'm closing this since it's an old discussion. |
Beta Was this translation helpful? Give feedback.
-
Long time users, first time post. Love the language! I didn't know where to put this and submitting an issue didn't feel right. I was wondering if it would be possible to allow using different styles of hash for the router. React Router, recognizes three different styles:
#/
and#/sunshine/lollipops
#
and#sunshine/lollipops
(I believe this is Mint's current implementation)#!/
and#!/sunshine/lollipops
React Router defaults their hash type to the "slash" option, but allows users to pick one of the others if they want. My experience and Googling seem to indicate that the "slash" option is the most common. Maybe it would be possible in Mint to either default to the "slash" style or allow users to pass in the style of hash they want to use? Not sure how easy that would be to implement though.
Honestly, I bring this up because I think the "noslash" isn't very attractive. Neither is the "hashbang", which is quite an old way of doing hash routing. Being able to make prettier urls would be nice.
I've seen a few workarounds that involve capturing on the
*
route and parsing the hash manually, but doing so means you lose the params type safety that's built into the router in the normal usage, and adds a bit more work to extract the param.Thanks for your consideration!
Beta Was this translation helpful? Give feedback.
All reactions