刷新带有参数reactjs laravel mix参数的页面时出现错误404

实际上,不仅是刷新时,还尝试在新标签中打开它时也找不到

这是我的路由器,问题出在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()}>并且没有任何更改。预先感谢

hebeitangshanqianan 回答:刷新带有参数reactjs laravel mix参数的页面时出现错误404

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3124333.html

大家都在问