In a context like this
function ActionLink() {
function handleClick(e) {
e.preventDefault();
console.log('The link was clicked.');
}
return (
<a href="#" onClick={handleClick}>
Click me
</a>
);
}
As you can see, you have to call preventDefault() explicitly. I think that this docs, could be helpful.