Reputation: 743
<Link to={{pathname:'/profile',query: {id: {user.id}}}>View </Link>
I want to render a link that go to a path, but in my dom I see profile/user?user.id
Early on I tried something more simple
<Link to="/profile/{user.id}">View </Link> it doesn't work too.
Upvotes: 0
Views: 238
Reputation: 101
<Link to={"/profile/" + user.id}>View </Link>
This is what you're looking for
Upvotes: 1