Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
340
How to build beautiful Vuesualizations
ntepluhina
0
110
Other Decks in Programming
See All in Programming
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
3.8k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
200
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
240
気持ちぃ〜角丸 Squircle
ryu1013
0
310
Workers Cache を知る
syumai
0
370
AmebaブログはKMPから卒業します
kmars0605
0
200
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
247
13k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Embracing the Ebb and Flow
colly
88
5.2k
Raft: Consensus for Rubyists
vanstee
142
7.8k
We Have a Design System, Now What?
morganepeng
55
8.4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
4 Signs Your Business is Dying
shpigford
187
23k
GraphQLとの向き合い方2022年版
quramy
50
15k
Paper Plane
katiecoart
PRO
5
54k
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
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