~/talk

How Not to Use TanStack Query

Talkat JSHeroes 2026 · 2026-05-14..05-15· [databases, frontend-architecture]
slides:none on file

Adopts TanStack Query as a server-state cache but misuses blanket invalidations around a gamification system of 100 gamification actions, causing cascades that hit 1,400 requests/sec and produce as many as 150 requests per click. Remedies: debounce/queueing cuts repeated actions (requests drop from 66 to 11), abort controllers and disabling retries for hotspots, and finally returning the full gamification payload and using setQueryData to update cache so GETs become rare and the DB load subsides.

AI-written summary · about

  1. 0:00TanStack Query misuse
  2. 3:36Why we chose TanStack Query
  3. 7:25Performance disaster begins
  4. 11:39Fixing request overload
  5. 17:34Myths on staleTime and cacheTime
  6. 20:46TanStack Query best practices
  7. 22:29Closing
~/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.