score:1

Accepted answer

you're not passing props down to app, so unless you use the location context, it won't have them.

you should do...

render () {
  return (
    <app {...this.props}/>
  )
}

then, you should have access to this.props.children in app to render the nested route(s). you'll need to specify that in rightcontent too...

render(){
  return (
    <div>
      <sidebar/>
      <rightcontent>
        {this.props.children}
      </rightcontent>
    </div>
  )
}

see the tutorial in the docs... https://github.com/reactjs/react-router/blob/master/docs/introduction.md#with-react-router


Related Query

More Query from same tag