React-router Clicking on the same route with different parameters will not automatically remove the original route.

  node.js, question

Well, I used react-router in my project.
I used react-router to make an effect similar to tabbarview, that is to say, click a tab and switch out the corresponding content.
Then the problem arises. I set the following route for each tabbaritem

<Route path="/tab" component = {TabView}>
 <Route path = ":id" component = {TabViewDetail}/>

Then I clicked the corresponding link on the interface. As a result, once you click, the browser address bar will have an extra /tab

As follows:


What is this situation?

If I switch to another route, the original route will not be overlapped. In other words, only the same route and different parameters will overlap the same route after the address.

Did you use Link and write it on the address/tab/1And then set up basename?