react-router match query string

Viewed 7317

https://github.com/reactjs/react-router/example

I tried the example on npm start

query string match to route is not working on the example. When I click the second one, It's activating wrong one

http://localhost:8080/query-params/user/bob?showAge=1 and refreshing on the link above not matching any routes.

Even if I have change the example code to below <Route path="user/:userID(?:showAge)" component={User} /> I tried couple of things that might work based on docs but none of them worked.

Am I missing something?

2 Answers
Related