I'm generally avoiding the use of this in my code, but most of my code has been AngularJS, and we're very rarely using the object prototype in the first place. Rather than mix-in functions and inheritance, we're using factories and injecting them as dependencies into factories and controllers that depend upon them.
I do kind of have a pet peeve against const self = this; and have been removing it where I can. I feel like it's a symptom of Java developers that really really want to build a class.
That being said, I do sometimes wonder if I'm missing some cool use cases for this.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm generally avoiding the use of this in my code, but most of my code has been AngularJS, and we're very rarely using the object prototype in the first place. Rather than mix-in functions and inheritance, we're using factories and injecting them as dependencies into factories and controllers that depend upon them.
I do kind of have a pet peeve against
const self = this;
and have been removing it where I can. I feel like it's a symptom of Java developers that really really want to build a class.That being said, I do sometimes wonder if I'm missing some cool use cases for this.