如何将所有子路径定向到到达路由器中的组件

时间:2020-09-01 14:00:08

标签: reactjs reach-router

我在Reach Router中有一个路由器,如下所示:


<Router>
              <Redirect from="/" to="/talent" noThrow />
              <Global path="global" />
              <Global path="global/*" />
              <Global path="global/*/*" />
              <Global path="global/*/*/*" />
              <Candidates path="talent" />
              <Candidates path="talent/*" />
              <Candidates path="talent/*/*" />
              <Candidates path="talent/*/*/*" />
</Router>

是否有更好的方法将所有子路径都指向同一组件?

0 个答案:

没有答案
相关问题