Answer the question
In order to leave comments, you need to log in
How to hang an onClick event on a NavLink (ReactRouter) component?
Greetings) How to hang an onClick event on NavLink from ( ReactRouter)?
I need an action to be launched on a click on the NavLink , but by hanging this on the onClick event , the page reloads.
Thank you)
Answer the question
In order to leave comments, you need to log in
like any other link: onClick={(event) => {event.preventDefault()}}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question