~/talk

React Query Under the Hood

Talkat ReactNext 2024 · on Monday, 2024-06-24· [react, frontend-architecture]
slides:none on file

Builds a tiny React Query clone in vanilla JS and React hooks, wiring a createQuery/client that holds a global map of query instances so references survive navigations. Implements caching, a pub-sub for subscriber updates, deduping via request state to avoid duplicate network calls, and time-based policies: staleTime 10s, gcTime 15s. Live demo fetches posts, shows free background refetch when cache exists, and the implementation works as presented.

AI-written summary · about

  1. 0:00Introduction
  2. 5:18Abstracting React Query
  3. 10:12Connecting to React
  4. 12:23Query instance management
  5. 16:38Styling and revalidate
  6. 18:45Garbage collection time
  7. 22:43Summary and basic implementation
  8. 23:48React 18 External Store
  9. 24:50Q&A
~/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.