Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
Module Harmony
petamoriken
2
610
How Software Deployment tools have changed in the past 20 years
geshan
0
27k
CSC305 Lecture 15
javiergs
PRO
0
240
バックエンドエンジニアによる Amebaブログ K8s 基盤への CronJobの導入・運用経験
sunabig
0
130
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
320
非同期処理の迷宮を抜ける: 初学者がつまづく構造的な原因
pd1xx
1
420
JJUG CCC 2025 Fall: Virtual Thread Deep Dive
ternbusty
3
510
エディターってAIで操作できるんだぜ
kis9a
0
620
Microservices rules: What good looks like
cer
PRO
0
420
無秩序からの脱却 / Emergence from chaos
nrslib
2
11k
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
6
2.9k
ソフトウェア設計の課題・原則・実践技法
masuda220
PRO
24
21k
Featured
See All Featured
Speed Design
sergeychernyshev
33
1.3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.8k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Embracing the Ebb and Flow
colly
88
4.9k
Context Engineering - Making Every Token Count
addyosmani
9
450
We Have a Design System, Now What?
morganepeng
54
7.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
690
Code Review Best Practice
trishagee
73
19k
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