Answers for "passsing data via routes in react"

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="/" component={() => <Search name={this.props.name} />} />
Posted by: Guest on March-16-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language