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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
130
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
420
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
1
260
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
190
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
240
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
450
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.7k
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
190
What's New in Android 2026
veronikapj
0
240
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
750
継続モナドとリアクティブプログラミング
yukikurage
3
670
React本体のコードリーディング
high_g_engineer
1
120
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
750
Writing Fast Ruby
sferik
630
63k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
sira's awesome portfolio website redesign presentation
elsirapls
0
310
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Designing for Performance
lara
611
70k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Embracing the Ebb and Flow
colly
88
5.1k
Making Projects Easy
brettharned
120
6.7k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
590
Skip the Path - Find Your Career Trail
mkilby
1
170
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.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