~/talk

Local State and Server Cache: Finding a Balance

Talkat JS Conf Armenia 2021 · on Saturday, 2021-10-23· [frontend-architecture]
slides:none on file

Compares Vuex/Redux for local state with Apollo Client and react-query/view-query for server cache and claims one tool should not try to solve both. Demonstration uses REST + axios on a local server (port 4000), implements useQuery/useMutation, shows default retry = 3, shows cache considered stale by default so staleTime default causes refetch on remount, and contrasts invalidateQueries vs setQueryData for updating cache — both work, manual cache update avoids the extra refetch.

AI-written summary · about

  1. 0:00Start
  2. 0:05Local state and server cache: finding a balance
  3. 8:30Apollo Client
  4. 10:20One size doesn't fit all
~/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.