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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -