… but if inside
this.method
you have a reference tothis
, you get the unexpected behavior (unexpected context object) …
Yes, that is why it’s not redundant: the behaviour is different. Nothing in the article stated that passing this.method
instead of e => this.method(e)
would not work — as long as the this
context was not relied upon. Rather, the article highlighted some maintenance risks associated with the practice.
Another way to look at it is that implementing method
as a non-static method is unnecessary in the first place, if it doesn’t rely upon the this
context. Just implement it as a stand-alone function and pass it directly — i.e. without the arrow function.