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

Read out url parameters in page #4834

Closed
jwamsterdam opened this issue Mar 24, 2017 · 3 comments
Closed

Read out url parameters in page #4834

jwamsterdam opened this issue Mar 24, 2017 · 3 comments

Comments

@jwamsterdam
Copy link

Hi, I am currently deeplinking to a page which gets routed by react router.
I link in the following way:

<RaisedButton
    label="Submit"
    primary={true}
    keyboardFocused={true}
    onTouchTap={() => this.props.history.push('/results?origin=123')}
/>

What I cant really find in the documentation is how to read out the value of 'origin' in my results component. Any tips?

@timdorr
Copy link
Member

timdorr commented Mar 24, 2017

#4527 (comment)

@timdorr timdorr closed this as completed Mar 24, 2017
@jwamsterdam
Copy link
Author

Is an external library like qs needed for this? Is this not out-of-the box functionality of React-Router v4?

@timdorr
Copy link
Member

timdorr commented Mar 24, 2017

Yes, because all the libraries differ in implementation and we don't want to prescribe a best behavior. Plus, it reduces the router footprint significantly for those that don't use query parsing.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
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