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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -