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.4k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
You Might Not Need Vuex
A few alternatives to Vuex state management in Vue application
Natalia Tepluhina
February 21, 2020
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
110
Other Decks in Programming
See All in Programming
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
190
Google Apps Script で Ruby を動かす
kawahara
0
140
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
180
the container ship “Apple Silicon”@WWDC26 Recap -Japan-\(region).swift
shingangan
0
110
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
490
FDEが実現するAI駆動経営の現在地
gonta
2
270
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
540
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
630
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
590
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
220
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
300
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
370
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
37
7.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
290
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
500
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
A Tale of Four Properties
chriscoyier
163
24k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Practical Orchestrator
shlominoach
191
12k
Automating Front-end Workflow
addyosmani
1370
210k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
480
BBQ
matthewcrist
89
10k
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