Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #router #send #data
ADD COMMENT
Topic
Name
2+4 =