Answer the question
In order to leave comments, you need to log in
How to transfer data via NavLink?
How can I pass data to another component via NavLink?
Is there something like this?
<NavLink to="/test" state={myData}>ссылка</NavLink>
Answer the question
In order to leave comments, you need to log in
If you use Link instead of NavLink, then you can
https://reacttraining.com/react-router/web/api/Link
something like this
<Link to={{
pathname: '/test',
state: { data: myData }
}}/>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question