实际上,不仅是刷新时,还尝试在新标签中打开它时也找不到
这是我的路由器,问题出在produk /:userId路径上
<BrowserRouter>
<div>
<Master/>
<Switch>
<Route exact path="/" component={Home} />
<Route path="/home" component={Home} />
<Route path="/login" component={Login} />
<Route exact path="/produk/:userId" component={Product} />
</Switch>
</div>
</BrowserRouter>
我已经将路由路径更改为produk路径上的精确路径,尝试使用<router history={createbrowserhistory()}>
并且没有任何更改。预先感谢