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
模組化的Swift架構(一) Redux入門
Search
Hai Feng Kao
June 23, 2022
Programming
160
0
Share
模組化的Swift架構(一) Redux入門
2022/3/15 ios@Taipei分享
介紹SwiftRex
Hai Feng Kao
June 23, 2022
More Decks by Hai Feng Kao
See All by Hai Feng Kao
物件導向的文藝復興:用DCI重塑程式設計的藝術
haifengkao
0
170
模組化的Swift架構(二) DDD速成
haifengkao
0
900
日常生活中的腦殘
haifengkao
0
290
機器學習超入門
haifengkao
0
180
UICollectionView自動布局
haifengkao
1
460
宅宅設計入門2
haifengkao
2
310
宅宅設計入門
haifengkao
5
330
Other Decks in Programming
See All in Programming
AIエージェントと協働するCLI開発 — BunとOpenClawで学んだこと
yoshikouki
1
150
AWSはOSSをどのように 考えているのか?
akihisaikeda
1
130
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
4
490
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
530
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
3
420
[BalkanRuby 2026] Drop your app/services!
palkan
3
630
inferと仲良くなる10分間
ryokatsuse
1
180
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
290
横断組織出身のQAEがインプロセスQAEでつまずいたこと・活かせたこと
ty89
0
170
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
620
Agentic AI & UI: Arcitecture, HITL, Emerging Standards
manfredsteyer
PRO
0
130
tsserverとは何だったのか_これからどうなるのか
nowaki28
1
310
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
170
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
200
Context Engineering - Making Every Token Count
addyosmani
9
900
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.6k
Skip the Path - Find Your Career Trail
mkilby
1
120
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
Six Lessons from altMBA
skipperchong
29
4.2k
Transcript
Redux入⾨ Hai Feng Kao 模組化的Swift架構(⼀)
None
Action0 State0 Action1 State1 Action2 State2
None
Redux • Single source of truth • Read-only state •
New state is created by pure function
Swift的Redux框架 • ReSwift • swift-composable-architecture • SwiftRex
None
Redux的優點 • Debug容易 • AOP簡單 • 和SwiftUI契合度⾼
Redux缺點 • 同功能的程序碼散落各處 • 處理side e ff ect⿇煩 • Async
operation • External state management
µFeatures Architecture • A µFeature contains • Example target •
Test target • Framework target
None
µFeatures + Redux • A µFeature’s framework target contains •
Actions • States • Reducers • Middlewares
Demo
Redux的缺點 • 當新增⼀個µFeature • 把µFeature的reducer加入reducer list • 把µFeature的middleware加入middleware list •
把µFeature的state加入global state • 處理reducer、middleware、state的投影(projection)