Using "react-router-dom": "^5.2.0" and "react": "16.8.6",
I have this:
<Switch>
<Route path="/users" component={Users} />
<Route path="/users/:id" component={Users} />
</Switch>
and in the Users component:
const param = useParams();
console.log(param);
So if I enter /users or /users/10 always param renders as empty object. What am I missing here?