If we have a component that has an <a> tag and this component has a series of children and we want the link not to work if those children are clicked and the link work if is clicked directly on the main component, the children have their own onClick function
is there a way to work?
Asked
Active
Viewed 11 times
0
-
2Use `event.stopPropagation()` in the event listeners for the children. – Barmar Jul 25 '21 at 05:24