标签: javascript reactjs react-router-v4
我有一个Account的组件,Switch像这样:
Account
Switch
<Route path="/account" component={Account} />
从/account路径,我可以去/account/setting,然后从那里去/account/setting/custom。
/account
/account/setting
/account/setting/custom
有没有一种方法可以不重复每条路线中的先前零件?像这样:
/account {previous}/setting {previous}/custom