Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
You Might Not Need Vuex
Search
Natalia Tepluhina
February 21, 2020
Programming
1
1.3k
You Might Not Need Vuex
A few alternatives to Vuex state management in Vue application
Natalia Tepluhina
February 21, 2020
Tweet
Share
More Decks by Natalia Tepluhina
See All by Natalia Tepluhina
All you need is Apollo Client
ntepluhina
0
330
How to build beautiful Vuesualizations
ntepluhina
0
94
Other Decks in Programming
See All in Programming
Event Storming
hschwentner
3
1.3k
nilとは何か 〜interfaceの構造とnil!=nilから理解する〜
kuro_kurorrr
3
1.7k
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
210
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
0
210
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
310
SourceGeneratorのマーカー属性問題について
htkym
0
170
Python’s True Superpower
hynek
0
200
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
170
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
370
15年目のiOSアプリを1から作り直す技術
teakun
1
610
Ruby x Terminal
a_matsuda
7
590
浮動小数の比較について
kishikawakatsumi
0
380
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
96
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
470
Chasing Engaging Ingredients in Design
codingconduct
0
130
Skip the Path - Find Your Career Trail
mkilby
1
72
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
The Cost Of JavaScript in 2023
addyosmani
55
9.7k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
How GitHub (no longer) Works
holman
316
140k
From π to Pie charts
rasagy
0
150
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Transcript
YOU MIGHT NOT NEED VUEX
YOU MIGHT NOT NEED VUE
Core Team Member My name is Natalia Tepluhina Google Developer
Expert Senior Frontend Engineer @N_Tepluhina
Do I need a shared state?
“ “Flux libraries are like glasses: you'll know when you
need them” Dan Abramov
Independent components Different routes Deep nesting
Provide/inject approach
Provide Inject
Reactive object
Don’t change data where it’s injected!
Composition API to the rescue
posva/pinia Automatically typed, modular and lightweight store for Vue using
the Composition api with DevTools support Eduardo San Martin Morote
Creating a store
Using a store in components
DEMO
Let’s get some GraphQL hype!
vue-apollo Integrates Apollo in your Vue components with declarative queries.
Compatible with Vue 2.0+ and 3.0+. Guillaume Chau
Dispatch an action Trigger API call Success? Commit ‘success’ mutation
State changed Commit ‘error’ mutation Yes No
None
Query Success/error State changed
Ok but what about local state?
Local state* = Apollo Cache *everything is Apollo Cache
‘Normal’ query…
..vs local query
Setting initial state
Changing data
Read the cache Update data Write back to the cache
DEMO
Thanks! You can find demo repository at bit.ly/no-vuex