Skip to content
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

Add support for queryHistory #784

Open
eddiecooro opened this issue Apr 1, 2020 · 0 comments
Open

Add support for queryHistory #784

eddiecooro opened this issue Apr 1, 2020 · 0 comments

Comments

@eddiecooro
Copy link

eddiecooro commented Apr 1, 2020

Hey there.
I don't know how much this is practical, but it would be great if this library could support a queryHistory.
We are developing a react based widget that can be used on many different websites and therefore we can't have any assumptions about how the user uses the hash or the actual pathname of the URL.
At first, we were using MemoryRouter, it was great and we didn't have any conflict with the consumer navigation system. But now we need to also have some shareable links so the MemoryRouter is not useful anymore.
I was thinking to have a router, which uses a query parameter to handle the routing and I was pretty surprised when I found out that we don't have a package for doing that 😄
What I have in mind, is something like this:

createQueryRouter({
  queryParameterName: "namespaced_path"
})

and then the URL will look like this:
/any/path?namespaced_path=/hello
/any/path?namespaced_path=/nested/route/like/this

So I want to ask, is there any technical limitation that you can think of, for having this kind of router? if not, I like to try to add this functionality to the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant