Skip to content
This repository has been archived by the owner on May 20, 2021. It is now read-only.

query parameters from url not passed to route #45

Closed
sirpy opened this issue Nov 28, 2019 · 3 comments
Closed

query parameters from url not passed to route #45

sirpy opened this issue Nov 28, 2019 · 3 comments

Comments

@sirpy
Copy link

sirpy commented Nov 28, 2019

If I load a url localhost/?test=1
navigation.state.params will be empty
only when using navigation.navigateTo(route,params) it works

@509dave16
Copy link

@sirpy Make sure you are using createBrowserApp from react-navigation/web instead of createAppContainer from @react-navigation/core for web platform. Container created by createAppContainer will not respond to url changes like it does when created by createBrowserApp.

@sirpy
Copy link
Author

sirpy commented Mar 15, 2020

@509dave16
i am using it. currently i have to parse the params from window.location myself

@sirpy
Copy link
Author

sirpy commented Mar 23, 2020

@509dave16
i've tested things again, this actually works, what doesnt work is this
#30
using navigation.navigate(route,params) doesnt set params in navigation.state.parms

@sirpy sirpy closed this as completed Mar 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants