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

naviagte-to with query-params #64

Closed
royalaid opened this issue Jan 6, 2019 · 5 comments
Closed

naviagte-to with query-params #64

royalaid opened this issue Jan 6, 2019 · 5 comments

Comments

@royalaid
Copy link

royalaid commented Jan 6, 2019

Maybe I am missing something but it doesn't seem possible currently to use the internal reitit router with :navigate-to and query-params.

@ingesolvoll
Copy link
Owner

Thank you for reporting! I didn't have time to look into this, and never tried that myself. Do you have any ideas what would need fixing?

@MaxSt
Copy link

MaxSt commented Jan 18, 2019

You can use :navigate-to with query-params by using the :query-string keyword.
Here is an example

:navigate-to [:example {:query-string "abc=test"}]

In order to produce the query string out of a map you could use a library like https://github.com/cemerick/url:

:navigate-to [:example {:query-string (url/map->url {"abc" "test"})}]

@royalaid
Copy link
Author

royalaid commented Jan 21, 2019 via email

@ingesolvoll
Copy link
Owner

I will try to remember to include an example in the docs. A PR would also be appreciated and accepted :)

ingesolvoll added a commit that referenced this issue May 12, 2019
@ingesolvoll
Copy link
Owner

Added a link to this issue in the readme. Thanks guys!

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

3 participants