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

Access request URL (for search params) #136

Closed
dionjwa opened this issue Aug 9, 2022 · 2 comments
Closed

Access request URL (for search params) #136

dionjwa opened this issue Aug 9, 2022 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@dionjwa
Copy link

dionjwa commented Aug 9, 2022

It's not clear how, or if it's possible, to access the request URL for the purposes of inspecting the pathname and search params and rendering based on that information.

Is it possible? Are there examples? The use of wouter to accomplish this isn't clear.

@mashaal
Copy link
Member

mashaal commented Aug 23, 2022

Very interesting find, I wasn't aware of this limitation.

It seems this is being tracked in wouter here: molefrog/wouter#58

I'm not sure if atm this can be solved with wouter, but it's worth noting that our V2 release allows you to BYO routing lib.

@mashaal mashaal added enhancement New feature or request help wanted Extra attention is needed labels Aug 23, 2022
@deckchairlabs
Copy link
Member

In v2 this is possible, I've updated our wouter example to include how this could be done. Although, would be far better if wouter had this support baked in.

https://github.com/exhibitionist-digital/ultra/tree/main/examples/with-wouter

The secret sauce is a custom context provider, and some event listening.

@mashaal mashaal closed this as completed Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants