Re:JavaScript fundamentals before learning React
by barskern on Friday July 20, 2018 @01:30AM
(#17572705)
No it is not equal because the former autobinds `this` into the body of the arrow function, however the latter is "just" a function pointer hence will not be called with the correct `this` value. One way to get around this is using `this.smth.bind(this)`, which binds the correct `this` for the later execution.
[ Parent
| on HN ]
There are no comments on this comment yet.