dynamic routes in react router dom code example
Example: react router dynamic routes
<Route path="/:id" render={(props) => (<Component {...props} />)} />
// or
<Route path="/:id" component={Component} />
<Route path="/:id" render={(props) => (<Component {...props} />)} />
// or
<Route path="/:id" component={Component} />