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
深入淺出 Redux
Search
shiningjason1989
July 05, 2016
Technology
12k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
深入淺出 Redux
shiningjason1989
July 05, 2016
More Decks by shiningjason1989
See All by shiningjason1989
5 分鐘與我一起探索最佳的搜尋體驗
shiningjason1989
1
66
I want to be a web guitar player
shiningjason1989
0
370
PikaPika
shiningjason1989
2
850
前端之今天的我,未來的我們
shiningjason1989
0
280
Progressive Web App 之是否是我的未來
shiningjason1989
4
1.5k
Flux 角色詳解
shiningjason1989
4
10k
Flux 流程詳解
shiningjason1989
2
9.8k
如何打造一個百人 stars 的 React Native 元件
shiningjason1989
1
270
前端魔法師召集令
shiningjason1989
1
260
Other Decks in Technology
See All in Technology
クロスボーダーM&AのValue Upを支えるプロダクト開発。日米チームのハブになったプロダクトエンジニアの実践 / Product Engineering Conference 2026
genda
0
110
作り直せるコードは迅速に 作り直せないDBは慎重に - AI時代のプロダクトエンジニアが「判断の不可逆性」で開発速度を変える話
kinosuke01
0
300
ペアプロの価値はコードを書くことだけじゃない
codmoninc
PRO
0
160
GuardDuty 検知対応を DevOps Agent で効率化しようとしている話 / GuardDuty Investigations with DevOps Agent
masahirokawahara
1
350
#jawssonic2026 あの時代が悪かった ~動かなかったSageMakerと共に迎えたイベント当日~
ktkn1129
0
140
AIで仕事のやり方を変える
matsu7874
3
1k
AI 駆動 Terraform 開発/SRE_BizReach_MIXI_2
visional_engineering_and_design
3
2k
「重なり」は迎える側がつくる ― 人もAIエージェントも歓迎するプロダクトエンジニアリング ―
go0517go
PRO
0
280
Multica × 長期記憶:40個のミニプロジェクト管理
eiei114
1
230
AIネイティブプロダクトで顧客価値を最大化するプロダクトエンジニアとFDEの協働
righttouch
PRO
0
210
V8コントリビュート超入門
riyaamemiya
0
160
作品が生態系になった ─ Mini Tokyo 3D から世界へ
nagix
0
150
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
432
67k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
520
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
320
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
320
Accessibility Awareness
sabderemane
1
210
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Typedesign – Prime Four
hannesfritz
42
3.2k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
680
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
500
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Transcript
3FEVY
'MVY 䱳鎣3FEVY⯓㔐곃
Dispatcher Stores Views Action Action
㻜♳䧮⦛剚呏亙♶ず噠䬓ⴕ4UPSF Dispatcher Store Views Action Action Store Store
㻜♳䧮⦛剚呏亙♶ず噠䬓ⴕ4UPSF ⢿㥶5PEP4UPSF 6TFS4UPSF Dispatcher Store Views Action Action TodoStore UserStore
齡랃⡹鼩鎹䖤4UPSF⨞✫ㆭ❉✲䞕㌨ Dispatcher Store Views Action Action Store Store
4UPSF剤Ⰽ⦐⚺銴耷顑 Store
4UPSF剤Ⰽ⦐⚺銴耷顑 ⮭㶸须俲朜䢀 Store let state = 0
4UPSF剤Ⰽ⦐⚺銴耷顑 ⮭㶸须俲朜䢀 呏亙"DUJPO佖隶须俲朜䢀 Store let state = 0 function change(action)
{ state = action.data }
⢪欽'MVY剚麂ⵌ涸 ㉏겗
殹䧮⦛⥜佖 Store state: 10 let state = 0 function change(action)
{ state = action.data }
殹䧮⦛⥜佖呏亙"DUJPO佖隶朜䢀涸齅鱀 Store state: 10 let state = 0 function change(action)
{ state = action.data + 1 }
殹䧮⦛⥜佖呏亙"DUJPO佖隶朜䢀涸齅鱀 㔔捀侮佅4UPSF刿倞✫须俲朜䢀⛳剚ꅾ縨 Store state: 0 let state = 0 function
change(action) { state = action.data + 1 }
⡹〳⟃䟝⫹殹⡹佖㸤♧⦐CVH Store user: Jason
⡹〳⟃䟝⫹殹⡹佖㸤♧⦐CVH 捀✫庠鑑㽠䗳갭ⱄ駵♧妄鏽ⱁ崩玑涸汥蕲㌨ Store user: null
鍑对 㥶⡦
⡹剤涮植鸏ꡠ꒳㉏겗僽➊랃㌨ Store let state = 0 function change(action) { state
= action.data }
4UPSF剤Ⰽ⦐⚺銴耷顑 ⮭㶸朜䢀 呏亙"DUJPO佖隶朜䢀 Store let state = 0 function change(action)
{ state = action.data }
4UPSF剤Ⰽ⦐⚺銴耷顑 䧮⦛䗳갭䪾㸐⦛䬓雊㸐⦛♶剚✽湱䕧갠 Store let state = 0 function change(action) {
state = action.data }
&MN ㉬涮倴
㖈&MNBSDIJUFDUVSF⚥刿倞.PEFM涸倰䒭僽 (msg, model) => model'
㖈&MNBSDIJUFDUVSF⚥刿倞.PEFM涸倰䒭僽 (msg, model) => model' 缺䧭涯鑨俒㽠僽 (ᤈ傶, 制眲) => 碝制眲
㖈&MNBSDIJUFDUVSF⚥刿倞.PEFM涸倰䒭僽 (msg, model) => model' 缺䧭涯鑨俒㽠僽 (ᤈ傶, 制眲) => 碝制眲
ⱄ涯♧럊㽠僽 蝚螂Ӟ㮆獢碍牧妔Ԩᤈ傶制眲牧ࢧ㯽碝制眲
䨾⟃䧮⦛䪾呏亙"DUJPO佖隶朜䢀涸齅鱀 㹁纏䧭♧⦐ⴅ侸 (action, state) => state'
䨾⟃䧮⦛䪾呏亙"DUJPO佖隶朜䢀涸齅鱀 㹁纏䧭♧⦐ⴅ侸 (action, state) => state' 䧮⦛〭鸏♧⦐ⴅ侸捀SFEVDFS
3FEVDFS 3FEVY剓呍䗱涸錚䙂
(action, state) => state' 3FEVDFS涸㥪贖僽 〳갸劍殹侸窍✮♧垺涸㔐⫄穡卓㽠剚♧垺
(action, state) => state' 3FEVDFS涸㥪贖僽 〳갸劍殹侸窍✮♧垺涸㔐⫄穡卓㽠剚♧垺 ⴅ侸管玑㸐㽠〫僽♧⦐矦㋲涸ⴅ侸
(action, state) => state' 3FEVDFS涸㥪贖僽 〳갸劍殹侸窍✮♧垺涸㔐⫄穡卓㽠剚♧垺 ⴅ侸管玑㸐㽠〫僽♧⦐矦㋲涸ⴅ侸 〳⟃殹⡲侸⫄黃䧴罏乩剤Ⱖ➮ⴅ侸管玑涸⮛럊
(action, state) => state' 3FEVDFS涸㥪贖僽 〳갸劍殹侸窍✮♧垺涸㔐⫄穡卓㽠剚♧垺 ⴅ侸管玑㸐㽠〫僽♧⦐矦㋲涸ⴅ侸 〳⟃殹⡲侸⫄黃䧴罏乩剤Ⱖ➮ⴅ侸管玑涸⮛럊 〳⟃⨞ⵌVOEPSFEP涸⸆腋
(action, state) => state' 3FEVDFS涸㥪贖僽 〳갸劍殹侸窍✮♧垺涸㔐⫄穡卓㽠剚♧垺 ⴅ侸管玑㸐㽠〫僽♧⦐矦㋲涸ⴅ侸 〳⟃殹⡲侸⫄黃䧴罏乩剤Ⱖ➮ⴅ侸管玑涸⮛럊 〳⟃⨞ⵌVOEPSFEP涸⸆腋
〳⟃⟤䠑佖隶锅欽ⴅ侸涸갫䎸
3FEVY 涸䧭䕎
㥶卓䧮⦛锅侮4UPSF鸏⦐錬蒀 Dispatcher Store Views Action Action Store Store
㥶卓䧮⦛锅侮4UPSF鸏⦐錬蒀 㼟嫦⦐4UPSF涸噠朜䢀̔ Store Store Store ̔
Store Store Store Store ̔ state subState subState subState 㥶卓䧮⦛锅侮4UPSF鸏⦐錬蒀
㼟嫦⦐4UPSF涸噠朜䢀̔穉䧭♧⦐朜䢀埠
㥶卓䧮⦛锅侮4UPSF鸏⦐錬蒀 㼟嫦⦐4UPSF涸噠朜䢀̔穉䧭♧⦐朜䢀埠 Store ̔ state auth todo user AuthStore TodoStore
UserStore
㥶卓䧮⦛锅侮4UPSF鸏⦐錬蒀 㼟嫦⦐4UPSF涸噠朜䢀̔穉䧭♧⦐朜䢀埠 㼟嫦⦐4UPSF佖隶朜䢀涸齅鱀 Store Store Store ̔ Store state subState
subState subState
㥶卓䧮⦛锅侮4UPSF鸏⦐錬蒀 㼟嫦⦐4UPSF涸噠朜䢀̔穉䧭♧⦐朜䢀埠 㼟嫦⦐4UPSF佖隶朜䢀涸齅鱀̔㼩䥰䧭嫦⦐3FEVDFS Store Store Store ̔ Store state subState
subState subState Store Store Reducer
Store ̔ state auth todo user AuthStore TodoStore UserStore 㥶卓䧮⦛锅侮4UPSF鸏⦐錬蒀
㼟嫦⦐4UPSF涸噠朜䢀̔穉䧭♧⦐朜䢀埠 㼟嫦⦐4UPSF佖隶朜䢀涸齅鱀̔㼩䥰䧭嫦⦐3FEVDFS reducer todoReducer userReducer authReducer
䨾⟃㥶卓㼟'MVY涸4UPSFT Dispatcher Store Views Action Action Store Store
䨾⟃㥶卓㼟'MVY涸4UPSFT 剐䳖䧭4UPSFㄤ3FEVDFST Dispatcher Store Views Action Action Store Store Reducer
state
㔔捀侮⦐䥰欽〫剤♧⦐4UPSF Dispatcher Store Views Action Action Store Store Reducer state
㔔捀侮⦐䥰欽〫剤♧⦐4UPSF 䧮⦛♶ⱄ銴%JTQBUDIFS Store Views Action Action Store Store Reducer state
罜鷴麕4UPSF䲿⣘涸"1* ⫄黃BDUJPO暟⟝ Store Views Action Action Store Store Reducer state
鸏㽠僽3FEVY Store Views Action Action Reducers