im referring to this: () => {}
I understand arrows functions are new in ES6. I also understand they bind automatically to the parent context using the this keyword
so if I had
class Person {
classFunc = () => {
}
}
this would be bound to the parent and I could use this referring to the parent scope automatically
but I sometimes see this in the code () => {}
, what does it mean?
for example
onClick={this.handleClick}
or
onClick={() => this.handleClick}
what is that second one doing? is it an anonymous function?