-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hash routing #3
Comments
I believe that URL router and hash router should be separated. I, personally, use hash router for popups. We can add extra hash router to this package. Do you have an idea of what it should do? |
I think it should parse url params Maybe also we should ever set hash to |
It will not fit my case, when I have list of popups. We can use a different hash routers for different use cases. Like BTW, why do you use |
What do you mean? How it looks?
Hm, I think it doesn't work on extension popup. In my case I just added new store subscribed to hash changes and parsed last param from url. It's quite enough for small cases. |
I use hash to store data about current opened popups like
Yeap, I like the idea. createHashStore(hash => parseHash(hash)) It could work for both our cases. |
Hello there, I've not digged yet into the code regarding encode/decodeURI stuff, and maybe I should open a separate issue for this? I put this here because my need it's kind of interlaced with this present issue. const routes = {
home: "/home",
content: "/content/:path?",
} as const; # Currently:
http://localhost:5173/content/%2Ftest_repo_1%2Fmain%2Fdocs%2Fllasslaa1683544785369.md
# Would like:
http://localhost:5173/content/test_repo_1/main/docs/llasslaa1683544785369.md
# Or maybe with opt-in hash routing, if possible?:
http://localhost:5173/content#/test_repo_1/main/docs/llasslaa1683544785369.md I'm not sure about allowed characters inside URL, after hash or search params… Inspiration: Stoplight Elements or Redoc Redocly are offering all sort of routing options (dynamic path segments or hash). Thanks for hearing me! |
@JulianCataldo yes, it should be a separated issue (and very likely that I will need a PR for this) |
I embed small svelte apps in php pages. In this case I just can't use real URLs. It would be great to have a fully functional hash page router. No pressure on maintainers, just describing one more use case |
Developing chrome extension I realised that I can't use nanostores for routing because it doesn't use hash.
Are there any plans to add hash routing?
The text was updated successfully, but these errors were encountered: