~/talk

State Management with Composition API

Talkat JSWorld Conference 2022 · 2022-02-09..02-11· [vue, frontend-architecture]
github:Vannsl
slides:none on file

Demonstrates replacing Vuex in small apps by using the Composition API reactivity primitives to build a working dashboard: a local composable useItems with ref computed readonly for immutability, a global store by hoisting a top‑level ref plus provide/inject, and a folder‑based store pattern that mirrors Pinia. Shows TypeScript casting pain with inject, a case where UI didn’t update until state was truly global, and then integrates Pinia to show Pinia devtools timeline and clearer action tracing.

AI-written summary · about

  1. 0:00Introduction
  2. 1:08Talk goals with Composition API
  3. 2:10Demo app walkthrough
  4. 3:54Migrating to script setup
  5. 7:23Composable functions for state
  6. 8:46Adding feature with composables
  7. 10:10State to dedicated composable
  8. 11:57Global state with ref
  9. 14:06Pinia for store-like state
  10. 15:55Provide/inject for global state
  11. 17:20TypeScript with provide/inject
  12. 19:46Pinia vs provide/inject
  13. 20:48Demo of Pinia
  14. 22:13Summary
~/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.