简体   繁体   中英

React nested route not rendering a component

Could anyone share some light on why this Router configuration doesn't want to render the Project component while trying to access to/design/project/whatever ?

<Route path="/" component={MainWrapper}>
  <Route path="to/design/" component={Design}>
    <Route path="project/:id" component={Project} />
  </Route>
  <Route path="to/code" component={Code} />
</Route>

Thanks for your time!

我只是忘记在Design组件中指定{this.props.children}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM