reactjs - React-router Link component prevent default for child -
i'm trying place onclick handler on link child. problem is not firing because of link's transition method. there preventdefault or so? here's example in jquery world how stop redirection of parent href tag when clicked on child div?
from onclick docs:
a custom handler click event. works handler on
atag - callinge.preventdefault()prevent transition firing, whilee.stoppropagation()prevent event bubbling.
so should able use e.preventdefault
https://github.com/rackt/react-router/blob/master/docs/api.md#onclicke
Comments
Post a Comment