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

Route string[] paths with params #6502

Closed
jsg2021 opened this issue Dec 4, 2018 · 3 comments
Closed

Route string[] paths with params #6502

jsg2021 opened this issue Dec 4, 2018 · 3 comments

Comments

@jsg2021
Copy link

jsg2021 commented Dec 4, 2018

Version

4.3.1

Test Case

https://codesandbox.io/s/jjmlnxzky

Steps to reproduce

Click on Test 1, notice no id after id:
Click on Test 2 notice id: test2

Expected Behavior

The id param to be populated no matter which path matched.

Actual Behavior

The params in the second path only come through (or are replacing the first)

@pshrmn
Copy link
Contributor

pshrmn commented Dec 4, 2018

This is not possible with v4.3. Support for path arrays was added in #5889, which you can test in the v4.4 beta releases (npm i react-router-dom@next).

@pshrmn pshrmn closed this as completed Dec 4, 2018
@jsg2021
Copy link
Author

jsg2021 commented Dec 4, 2018

Ah, cool. I was just referencing the docs: https://reacttraining.com/react-router/web/api/Route/path-string-string

Sorry for the noise.

@pshrmn
Copy link
Contributor

pshrmn commented Dec 4, 2018

No worries, there was actually just another issue (#6500) about the docs site being different than the current release. The site used to be really outdated, but now it is automatically updated when new PRs are merged onto the master branch. Something should probably be done to make sure that the docs aren't giving incorrect information.

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