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}/>
</Route>
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:
http://localhost:3000/tab/tab/tab/tab/tab/1
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/1
And then set up basename?