I have the following line of code:
<Route path="/users/:id" exact ><User url={structure.users} /></Route>
In User component I do the following:
function User(props, {match}) {
useEffect(() => {
console.log(match);
console.log(props);
}, [props]);
// ...
}
I removed a bit of the code because I only want to show what is necessary but here I see that match is undefined but it should have match.params.id from the link. How can I achieve this so i can make the full url with the url with the attached id?