reactjs - {this.props.children} and route params of Parent? -


let's routes this

<router history={browserhistory>   <route path="/" component={app}>    <route path="project/:id" component={project}>      <route path="info" component={projectinfo} />      <route path="details" component={projectdetails />    </route>   </route> </router> 

i want fetch database project id, that's obvious. if in project component write {this.props.children} how pass on id projectinfo component can have information there. or not this?

i use in project navigate child components how id them!!!!!

you access id this.props.params.id.

the route /project/1 return id of 1.


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -