使用Laravel Mix无法反应路由器参数

时间:2020-07-19 07:50:08

标签: laravel react-router

伙计们,当我在react-router-dom中使用参数时,我将laravel mix与react一起使用,它无法正常工作并显示404页

   <Switch>
        <Route path="/" exact component={Home} />
        <Route path="/ad/:id" exact component={Ad} />
        {!store.getState()?.user && (
            <Route path="/login" guest component={Login} />
        )}
        <Route component={Error} />
    </Switch>

0 个答案:

没有答案