Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140220

ReactJs Pass data between multiple components using Id field

$
0
0

How can i pass Data from Main Component to child component based on the record Id. I have a index.js and detail.js pages. In the index page i have a link as <Link to={{ pathname:/cards/${results.id}, state: results }} className={card-wrapper restore-${results.id}}> {results.first_name} </Link> when i click on the link i want to send the data associated to that record /Id value of the link to the detail page and display.


Viewing all articles
Browse latest Browse all 140220


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>