Arrow Function Best Practices
Published on:When this
is used in an arrow function, this
will be the this
value in the surrounding lexical scope.
Arrow functions change MANY things, so there are two best practices you need to know.
- Don't create methods with arrow functions
- Create functions INISDE methods with arrow functions