Arrow functions
suggest changeArrow functions use the this value of the enclosing scope. They do not get their own this.
performSomething(result => {
this.someVariable = result
})
vs
performSomething(function(result) {
this.someVariable = result
}.bind(this))
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents