$30 off During Our Annual Pro Sale. View Details »
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
320
How to build beautiful Vuesualizations
ntepluhina
0
92
Other Decks in Programming
See All in Programming
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
750
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
130
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
410
20251127_ぼっちのための懇親会対策会議
kokamoto01_metaps
2
440
バックエンドエンジニアによる Amebaブログ K8s 基盤への CronJobの導入・運用経験
sunabig
0
160
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
170
Github Copilotのチャット履歴ビューワーを作りました~WPF、dotnet10もあるよ~ #clrh111
katsuyuzu
0
110
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
2
220
SwiftUIで本格音ゲー実装してみた
hypebeans
0
420
Python札幌 LT資料
t3tra
3
430
マスタデータ問題、マイクロサービスでどう解くか
kts
0
110
Graviton と Nitro と私
maroon1st
0
110
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.7k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Become a Pro
speakerdeck
PRO
31
5.7k
Visualization
eitanlees
150
16k
Navigating Team Friction
lara
191
16k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Building an army of robots
kneath
306
46k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
It's Worth the Effort
3n
187
29k
Git: the NoSQL Database
bkeepers
PRO
432
66k
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