Let's say I have the following 2 routes:
...
<Route exact path="/:param1?/" component={Home}/>
<Route path="/news" component={News}/>
...
now when I try to hit route /news
the root route for Home
with the parameter param1
is triggered...
I assume the solution would be to set a questionmark before the param1 like this /?param1
so it can be held appart from the routes, but I can not figure out how to do this in react-router v4