这是我的主要路由器页面App.js
:
<Provider store={store}>
<Router>
<Switch>
<Route exact path = "/" component= {FormPage}></Route>
<Route path = "/dashboard" component= {Dashboard}></Route>
</Switch>
</Router>
</Provider>
在仪表板页面中:
<Router>
<Switch>
<Route path = "/register" component= {Registration}></Route>
<Route path = "/home" component= {Home}></Route>
</Switch>
</Router>
在寄存器或主页中刷新后,没有任何显示。但是App.js
文件中的路由工作正常。
<Router>
<Switch>
<Route path = "/dashboard/register" component= {Registration}>
</Route>
<Route path = "/dashboard/home" component= {Home}></Route>
</Switch>
</Router>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句