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
100
Other Decks in Programming
See All in Programming
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
190
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
5.8k
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
250
Claspは野良GASの夢をみるか
takter00
0
190
Inside Stream API
skrb
1
710
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
540
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
JavaDoc 再入門
nagise
1
340
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
610
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
2
640
The NotImplementedError Problem in Ruby
koic
1
780
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
330
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
330
Rails Girls Zürich Keynote
gr2m
96
14k
The SEO identity crisis: Don't let AI make you average
varn
0
490
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Paper Plane
katiecoart
PRO
1
51k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
780
Code Review Best Practice
trishagee
74
20k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
840
Thoughts on Productivity
jonyablonski
76
5.2k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
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