Answer the question
In order to leave comments, you need to log in
One component different props???
Krch this situation is the Inbox component
<Switch>
...otherRoutes
Route path={'/inbox'} component={Inbox} />
</Switch>
function Inbox() {
Link to={'/inbox/someID'}
Link to={'/inbox/someID'}
Link to={'/inbox/someID'}
<div>
Route exact path={'/inbox/:id} component={Box}
</div>
class Box extends Component {
ComponentDidMount() {
fetchSomeData(this.props.match.params.id)
}
render(){
return (
<div>SomeData</div>
)
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question