I would like to change this:
<Router history={browserHistory}>
<Route path='/' component={Layout}>
<Route path='signup' component={SignupPage} />
<Route path='assemblies/' component={AssemblyPages}>
<Route path='categories/' component={Categories}>
</Route>
</Route>
</Router>
To
import AssembliesRoute from './AssembliesRoute';
<Router history={browserHistory}>
<Route path='/' component={Layout}>
<Route path='signup' component={SignupPage} />
<AssembliesRoute />
</Route>
</Router>
//AssembliesRoute.js
export default class extends compondent {
render(){
return <Route path='assemblies/' component={AssemblyPages}>
<Route path='categories/' component={Categories}>
</Route>
}
}
基本上,我想将嵌套在assemblies路由内的所有路由,在assemblies文件夹中的特定文件中处理,并将这些路由返回给路由器。但是当我尝试这样做时,却找不到路由。这种情况可能吗?