Skip to content

How to not match a pattern v4 #4032

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

Closed
gabrielbull opened this issue Oct 11, 2016 · 2 comments
Closed

How to not match a pattern v4 #4032

gabrielbull opened this issue Oct 11, 2016 · 2 comments

Comments

@gabrielbull
Copy link

Say I have two matches like this:

<Match pattern="add" component={AddUser}/>
<Match pattern=":id" component={ViewUser}/>

the second pattern matches the first one. Is there a way in v4 for this to work?

@ryanflorence
Copy link
Member

https://react-router.now.sh/ambiguous-matches

though a <MatchGroup/> component is coming and will make this less nutty.

@gabrielbull
Copy link
Author

gabrielbull commented Oct 11, 2016

+1 for the MatchGroup, using the Miss component is indeed nutty.

ryanflorence added a commit that referenced this issue Oct 26, 2016
closes #3936, #3994, #4032

be sure to see commit messages on cf2555d
@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 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