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 a tag - calling e.preventdefault() prevent transition firing, while e.stoppropagation() prevent event bubbling.

so should able use e.preventdefault

https://github.com/rackt/react-router/blob/master/docs/api.md#onclicke


Comments

Popular posts from this blog

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -