filmov
tv
Arrow Functions Explained In Under 3 Minutes - React - JavaScript - ES6

Показать описание
Tutorial Done inside React but it is the exact same for Java Script.
The main reason for arrow functions in Java Script & React is to access "this" found in the class. As with out an arrow function "this" will just refer to the global state (which will normally return undefined and crash the app). So remember to access "this" found inside the class use an arrow function.
There are other methods but bind a function to "this" though using an arrow function will be the most simple and clean way.
The main reason for arrow functions in Java Script & React is to access "this" found in the class. As with out an arrow function "this" will just refer to the global state (which will normally return undefined and crash the app). So remember to access "this" found inside the class use an arrow function.
There are other methods but bind a function to "this" though using an arrow function will be the most simple and clean way.