React.js Flashcards
1
Q
Why use fat arrow functions in React.js?
A
- Lexical ‘this’ binding, inherit this from the surrounding code, not dynamically. No need for manual binding.
- Conciseness, arrow functions provide a more concise syntax
2
Q
Where are fat arrow functions commonly used?
A
- Event handles
- Mapping arrays, performing transformations