~/talk

React Custom Hooks

Talkat ReactiveConf 2019 · 2019-10-30..11-01· [react, frontend-architecture]
links:none on file
slides:none on file

Claims that hooks let components be pure functions, reuse stateful logic with useState/useEffect/useContext, and run faster than classes. Demonstrates a custom screen-size hook: naive version attaches listeners per component and renders thousands of boxes in 8.7 seconds; refactor using a context provider drops that to 16.3 ms for 4,000 boxes. Points to a GitHub repo and an open source u5 library of hooks and components and shows the optimized code works.

AI-written summary · about

  1. 0:00Intro
  2. 1:28History
  3. 2:35Reuse of State
  4. 3:50Hooks
  5. 7:04State
  6. 8:28State Optimization
  7. 9:55Use Effect
  8. 12:26Rules for hooks
  9. 14:23What is customhook
  10. 16:20Screen Size
  11. 20:33Component Box
  12. 21:29Cleanup
  13. 22:17UseContext
  14. 24:21Custom Hooks
  15. 25:35Conclusions
~/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.