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
Post a Comment