What’s wrong with this? Seems like the classes support in JS is a lot better now than it used to be and this is a pretty essential part of that. I like a functional style too but sometimes a class is a good option.
I don't disagree with you. Maybe I should've been a little clearer in stating that, for the last 4-5 years, I've been almost exclusively a React dev. And in React, everything seems to be trending away from classes and toward functions. I'm on record as not "believing" in that trend - but I'm also on record as wanting to keep getting paychecks. So, for some time now, I haven't written a single class. Anywhere.
To be clear, the this keyword still "exists" in functions. But if you're writing purely in functions, I think it's a rather dodgy practice (obviously, just my opinion there) to keep using this.
What’s wrong with
this? Seems like the classes support in JS is a lot better now than it used to be andthisis a pretty essential part of that. I like a functional style too but sometimes a class is a good option.I don't disagree with you. Maybe I should've been a little clearer in stating that, for the last 4-5 years, I've been almost exclusively a React dev. And in React, everything seems to be trending away from classes and toward functions. I'm on record as not "believing" in that trend - but I'm also on record as wanting to keep getting paychecks. So, for some time now, I haven't written a single class. Anywhere.
To be clear, the
thiskeyword still "exists" in functions. But if you're writing purely in functions, I think it's a rather dodgy practice (obviously, just my opinion there) to keep usingthis.Yeah that makes sense.
thisin a functional style would be weird.