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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Where are fat arrow functions commonly used?

A
  • Event handles
  • Mapping arrays, performing transformations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly