// This Answer is taken from Here => https://flaviocopes.com/react-router-data-from-route/
////////////// first way ///////////////
////// Route ///////
<Route path="/project/:id">
<SingleProject />
</Route>
////// SingleProject Component ///////
import { useHistory, useParams } from 'react-router-dom'
export default function SingleProject(){
const id = useParams().id;
}
////////////// second way ///////////////
////// Route ///////
<Route path="/project/:id" render={(props) => <SingleProject {...props} />} />
////// SingleProject Component ///////
export default function SingleProject(props) {
const id = props.match.params.id
}
this.props.match.params.id
<Route path="/users/:id" component={UserPage}/>