React-router: How to not match a pattern v4

Created on 11 Oct 2016  路  2Comments  路  Source: ReactTraining/react-router

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?

Most helpful comment

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

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

All 2 comments

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

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

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

Was this page helpful?
0 / 5 - 0 ratings