~/talk

Michael Jackson - Composing Behavior in React or Why React Hooks are Awesome

Talkat React Loop 2019 · on Friday, 2019-06-21· [react]
slides:none on file

Builds a small workout app and proves hooks are just functions that compose real behaviors instead of abstract ideas The repo shows implemented hooks like usePersistentState that syncs a state value to localStorage, a history-based useUndo that stores a values array plus an index to undo and redo, a useLogger that wraps dispatch with a ref and effect to log actions and resulting state, and a thunk wrapper that lets dispatch accept async function actions All demos run live and the undo redo and logger behaviors work as shown

AI-written summary · about

  1. 0:00Start
  2. 7:01Functions
  3. 10:16Hooks Are Just Functions
  4. 12:47New Post Component
  5. 14:49Persistent State
  6. 17:53Redo Button
  7. 19:10Design this Behavior as a Hook
  8. 24:53Reducer
  9. 25:14Redux Middleware
  10. 28:54Asynchronous Actions
~/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.