~/talk

Composable components using React Context

Talkat JSWorld Conference 2021 · 2021-02-22..02-27· [react, component-design]
slides:none on file

Shows a concrete implementation: a tabs component that uses tabs provider composable API and builds both a default copy‑paste version and a custom composable version. Uses React useReducer with hooks and exposes two contexts (state + dispatch) to avoid unnecessary re-renders. Demonstrates label-based tab selection, defaultActive behavior, and click dispatches; the demo runs and switches tabs. References Material UI usage at scale (65k GitHub stars, ~300k downloads/day, ~6M/month) to justify approach.

AI-written summary · about

  1. 0:00Introduction
  2. 1:19What we will cover today
  3. 2:00Reusable UI components today
  4. 4:45Property drilling problems
  5. 5:48Module-based workarounds
  6. 8:18Need for composable components
  7. 9:45React Context overview
  8. 11:09Requirements for tabs
  9. 13:18Demos and code
  10. 17:31Tabs context and provider
  11. 22:28Default tabs implementation
  12. 23:37Error handling and state
  13. 23:58Stateless tab component
  14. 25:44Public API in tab scaler
  15. 26:27Rendering active tab content
  16. 27:10Separate contexts for state and API
  17. 28:11Material UI tabs exploration
  18. 28:53Other Context libraries
  19. 29:37When to use Context
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.