I was learning about React in Codecademy when I came across this example:
class MyClass extends React.Component {
myFunc() {
alert('Stop it. Stop hovering.');
}
render() {
return (
<div onHover={this.myFunc}>
</div>
);
}
I noticed that when myFunc is called, no parentheses were used and was wondering why. I would appreciate it if someone could explain it.