Does the chrome browser not update the web page for the first time due to different url parameters?

A React application, first visit the example.com/-sharp/user?id=1 page update, then copy the example.com/-sharp/user?id=2, click enter, the page is still the content of id=1, and refresh again to see the content of id=2. But when you visit example.com/-sharp/other, you can see the contents of other for the first time.
how to solve it?

Mar.18,2021

if you are dealing with id in constructor or componentDidMount , then it will not be updated, because if you only change the id, component will not be destroyed, only props has changed, at most re-render. So it depends on what you do with id

Menu