Guided Notes
ES6 for React
Arrow functions, classes, destructuring, spread, array methods, modules, and the ternary operator.
Why modern JavaScript matters
Slide 1 / 5React code leans heavily on JavaScript features added in ES6 (2015) and later. You'll see them on nearly every line:
| Feature | Where it shows up in React |
|---|---|
| Arrow functions | Event handlers, components, callbacks |
| const / let | Every variable and component |
| Destructuring | Props and useState: const [a, setA] = β¦ |
| Spread ... | Copying state objects and arrays |
| Array map / filter | Rendering and filtering lists |
| Modules | import React / export default App |
| Ternary ? : | Conditional rendering inside JSX |
