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
Transcript
29 slides
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
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
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
130
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
2k
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
2
160
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.3k
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
320
はじめてのPLATEAU
nokonoko1203
1
650
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
130
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
210
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
170
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
180
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
1
240
AI-Powered Domain-Driven Design
ziobrando
0
450
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
610
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
Ruling the World: When Life Gets Gamed
codingconduct
0
440
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
660
Amusing Abliteration
ianozsvald
1
390
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
570
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Chasing Engaging Ingredients in Design
codingconduct
0
400
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
370
Digital Ethics as a Driver of Design Innovation
axbom
PRO
2
520
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k