~/talk

React s Proposed useEvent Hook

Talkat UtahJS Conf 2022 · on Friday, 2022-09-23· [react]
links:none on file
slides:none on file

Proposal introduces useEvent as a hook that guarantees a stable function identity while keeping inner values current, so passing an onClick to a BuyButton stops causing child re-renders even when total changes. Demonstrations compare to useCallback/useMemo, show a shopping-basket example and a fetch-with-useEffect pattern, and warn it throws if called during render and breaks some form patterns. Track progress on github.com/reactjs; sponsors listed: JasperAI, Deepgram, Auth0.

AI-written summary · about

  1. 0:00Introduction and background
  2. 0:44What is useEvent hook
  3. 1:45Problem with re-renders
  4. 2:51Current solution with useCallback
  5. 3:33How useEvent solves it
  6. 4:34Example with useEffect
  7. 5:37Benefits of useEvent
  8. 6:22Drawbacks and limitations
  9. 7:03When to avoid useEvent
  10. 8:50Future of useEvent
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.