ES 6
- New features: let, const, arrow function, promise, class
- Problem of
var
is global scope
- Promise: represents the completion of an asynchonous operation and its return value
Functional component
- 4 phases: mounting, updating, unmounting, error handling
- mounting: init, state init, side effects
- updating: respond to user actions, changes in state, props
- unmounting: cleaning up event listeners, subscriptions, timers
- error handling: routing error to nearest error boundary (fallback ui), not crashing the app