Link 参数不在 JSX 中呈现(反应)

Link param doesn't render in JSX (react)

<Link to={{pathname:'/profile',query: {id: {user.id}}}>View </Link>

我想渲染一个指向路径的 link,但是在我的 dom 中我看到 profile/user?user.id

早些时候我尝试了一些更简单的方法

<Link to="/profile/{user.id}">View </Link> it doesn't work too.
<Link to={"/profile/" + user.id}>View </Link>

这就是您要找的东西