~/talk

Getting more out of your Pinia Stores

Talkat JSWorld Conference 2022 · 2022-02-09..02-11· [vue, web-performance]
slides:none on file

Pinia exposes Vue reactivity internals so stores live in a single app-wide ref turned into per-store refs, using effect scopes and ref unwrapping to keep one source of truth. The state() function runs only once (server render) so SSR needs a hydrate step; a skipHydrate flag prevents overwriting browser-backed composables like useLocalStorage. Differences between option stores and setup stores are concrete: setup always runs so composables work as-is, option stores need hydrate for writable composables. The solutions are implemented and solve the SSR overwrite problem.

AI-written summary · about

  1. 0:00Start
  2. 7:33THE PINIA INSTANCE
  3. 8:39PINIA HOLDS STATE
  4. 9:30PINIA CONNECTS STATE
  5. 11:56REF UNWRAPPING
  6. 17:25SERVER SIDE RENDERING (SSR)
  7. 23:46SETUP STORE
~/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.