~/lightning

Global vs. Component State in Vuex

Lightningat VueConf US 2019 · on Wednesday, 2019-03-27· [frontend-architecture, vue]
slides:none on file

Checklist-style rules and concrete examples decide where state lives: use Vuex store for data with a single instance or that changes from multiple places (example: a globally committed alert level), keep per-component data local when each component needs its own copy (example: an open flag per engine that otherwise opens every engine), compute derived values from base state (assigned crew member derived from crew array), and follow code examples that show commits and local props.

AI-written summary · about

  1. 0:00Introduction
  2. 0:35Two States: Local & Global
  3. 1:18Will this piece of data be the same across the entire app?
  4. 2:08Will this piece of data be used across more than one component?
  5. 2:31Is this piece of data generated based on other data in the application?
  6. 2:50Will this piece of data be used in a component that renders multiple times?
  7. 3:26Will the date be changed from multiple places?
  8. 4:00Belongs in Global State
  9. 4:23Belongs in Component State
~/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.