Why do you write event.preventDefault() in React?
Anonymous
doMeow = e => {
e.preventDefault();
// do meow here
}
render() {
return(
<a onClick={this.doMeow} href="/">Meow</a>
);
}
doMeow = e => {
e.preventDefault();
// do meow here
}
render() {
return(
<a onClick={this.doMeow} href="/">Meow</a>
);
}