Below is a snippet of code from codecademy. I'm new to Javascript and React so I just want to ask why parentheses isn't needed after this.myFunc. I thought invoking a function in Javascript requires parentheses. Is this React specific, or am I missing something here?
Thanks!
class MyClass extends React.Component {
myFunc() {
alert('Stop it. Stop hovering.');
}
render() {
return (
<div onHover={this.myFunc}>
</div>
);
}
}