SyntaxFix
Write A Post
Hire A Developer
Questions
Use render method:
<Route exact path="/details/:id" render={(props)=>{ <DetailsPage id={props.match.params.id}/> }} />
And you should be able to access the id using:
this.props.id
Inside the DetailsPage component