I need to pass some data in Link
component of react router v4
, but I cannot find a way to do it.
Basically, I have some links that are dynamically generated. I have linked these links with Link
component in the following way. Upon clicking one of these links, user is routed to a new component. I want to pass some data into these new component so that I can display them there.
<Link to="dynamic link here">some text</Link>
Is there some sort of <Link to="path" data="data here">some text</Link>
method in react router v4
? I cannot seem to find it in the documentation page.