I'm not Adam, but this post gives a thorough discussion of why it's not a great idea to use arrow functions specifically as method definitions, under the heading "Where You Should Not Use Arrow Functions" a little over halfway through. They're fine to keep using in general, just with caveats.
The short answer is "JavaScript", the medium answer is that arrow functions are like closures or lambdas if you know what those are from other languages, which means they operate in their parent's calling context as opposed to creating their own separate context. This can cause unintended behavior at worst, or at least lead to code reliant on implicit as opposed to explicit behavior which hurts readability.
Also a beginner, though, Adam may have a better/more correct take.
How’s it going, I'm a Adam, a Full-Stack Engineer, actively searching for work. I'm all about JavaScript. And Frontend but don't let that fool you - I've also got some serious Backend skills.
Location
City of Bath, UK 🇬🇧
Education
11 plus years* active enterprise development experience and a Fine art degree 🎨
Yep pretty much my opinion on arrows for example. They don't make sense everywhere, even if they do work everywhere. And your sighted post is bang on the money ... Imo 😁.
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 not Adam, but this post gives a thorough discussion of why it's not a great idea to use arrow functions specifically as method definitions, under the heading "Where You Should Not Use Arrow Functions" a little over halfway through. They're fine to keep using in general, just with caveats.
The short answer is "JavaScript", the medium answer is that arrow functions are like closures or lambdas if you know what those are from other languages, which means they operate in their parent's calling context as opposed to creating their own separate context. This can cause unintended behavior at worst, or at least lead to code reliant on implicit as opposed to explicit behavior which hurts readability.
Also a beginner, though, Adam may have a better/more correct take.
Yep pretty much my opinion on arrows for example. They don't make sense everywhere, even if they do work everywhere. And your sighted post is bang on the money ... Imo 😁.