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
ngxs
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Jecelyn Yeen
January 10, 2019
Programming
810
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ngxs
ngxs - state management made simple
Jecelyn Yeen
January 10, 2019
More Decks by Jecelyn Yeen
See All by Jecelyn Yeen
WorkerConf 2021 - Browser automation with Puppeteer
jecfish
0
1.9k
My Journey as Technical Presenter
jecfish
0
1k
Becoming a GDE
jecfish
0
3.9k
How to get started in IT Freelancing
jecfish
1
300
New Web API & Stylings
jecfish
3
760
如何打造高性能且SEO友好的单页应用(SPA)
jecfish
2
920
JS SEO
jecfish
4
1.6k
Web Performance Optimization
jecfish
5
1.8k
Have Fun with Angular
jecfish
0
130
Other Decks in Programming
See All in Programming
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
180
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
280
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
180
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
8
5.5k
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
880
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
180
数百円から始めるRuby電子工作
tarosay
0
110
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
370
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.6k
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.3k
Prismを使った型安全な暗号化_関数型まつり2026
_fhhmm
0
150
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
180
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
Prompt Engineering for Job Search
mfonobong
0
380
The SEO Collaboration Effect
kristinabergwall1
1
510
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
The browser strikes back
jonoalderson
0
1.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Statistics for Hackers
jakevdp
799
230k
Are puppies a ranking factor?
jonoalderson
1
3.7k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
610
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
320
Transcript
State Management Made Simple
@JecelynYeen - Google Developer Expert (GDE) - Blogger - Software
Architect - Women Who Code KL Director - ng-MY Conference Organizer
state management pattern + library for Angular
predictable state mutations
None
Why Yet Another State Management Solution?
Pick your flavor!
Reimagine State Management for Angular
Reduce Boilerplate
Rethink Developer Ergonomic & User API
Getting Started ng add @ngxs/schematics https://github.com/ngxs/schematics
Generate 2 files: .actions.ts, .state.ts ng generate @ngxs/schematics:store --name app
https://github.com/ngxs/schematics
Demo: Coffee https://ngxs-coffee.firebaseapp.com
Overview (State)
Overview (Actions) • [Coffee API] Get Coffee List • [List
Page] Add ToCart (coffeeName) • [Cart Page] Add One Cart Item (coffeeName) • [Cart Page] Remove One Cart Item (coffeeName) • [Cart Page] Remove Cart Item (coffeeName) • [Pay Component] Empty Cart
Overview (Actions) GetCoffeeList AddToCart AddOne RemoveOne Remove EmptyCart
Overview (Selectors) Coffee List Cart List Total Amount Total Quantity
Overview (Selectors) • [List Page] Coffee List • [Cart Page]
Cart List • [Pay Component] Total Cart Amount • [Header Component] Total Cart Quantity
Major NGXS Concepts Component Actions Store Plugins Backend dispatch m
utate select
Rxjs is awesome, but is it a must?
Effects can be painful
Make use of Dependency Injection (DI)
Making Actions Asynchronous
Plugins https://ngxs.gitbook.io/ngxs/plugins/intro
NGXS is extendable
CLI Router Storage Form Logger Websocket
Labs https://ngxs.gitbook.io/ngxs/ngxs-labs/intro
Innovation without Compromising Stability
Emitter - Get rid of Actions (until you really need
them)
Dispatch Decorator Immer Adapter
Extensive Documentation https://ngxs.gitbook.io/ngxs/
Do you know why it’s called NGXS? https://youtu.be/rkn73khwfWU?t=1582
Thanks for all contributors https://github.com/ngxs/store/graphs/contributors Austin Daniel | Mark Whitfeld
| Danny Blue | Leon Radley | Max Ivanov
Try me! > Twitter: @JecelynYeen Slides: https://speakerdeck.com/chybie/ngxs Demo: https://github.com/chybie/ngxs-coffee Demo
(Emitter): https://github.com/chybie/ngxs-coffee/tree/emitter-demo
Resources - Why another state management framework for Angular? -
NGXS official site - ngAir Live Video Podcast about NGXS - Announcing NGXS 3.1 - Announcing NGXS 3.3