Answers for "react router how to send data"

1

passing data in route react

<Route path="/:name" component={Search} />
Posted by: Guest on March-16-2021
0

react router how to send data

props.history.push('/other-page', { id: 7, color: 'green' }))

Then, you can access the state data in '/other-page' via:

props.location.state
Posted by: Guest on September-01-2020
0

passing data in route react

<Route path="/" render={() => <Search name={this.props.name} />} />
Posted by: Guest on March-16-2021

Code answers related to "react router how to send data"

Code answers related to "Javascript"

Browse Popular Code Answers by Language