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
0
140
模組化的Swift架構(一) Redux入門
2022/3/15 ios@Taipei分享
介紹SwiftRex
Hai Feng Kao
June 23, 2022
Tweet
Share
More Decks by Hai Feng Kao
See All by Hai Feng Kao
物件導向的文藝復興:用DCI重塑程式設計的藝術
haifengkao
0
120
模組化的Swift架構(二) DDD速成
haifengkao
0
850
日常生活中的腦殘
haifengkao
0
280
機器學習超入門
haifengkao
0
170
UICollectionView自動布局
haifengkao
1
450
宅宅設計入門2
haifengkao
2
300
宅宅設計入門
haifengkao
5
320
Other Decks in Programming
See All in Programming
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
240
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
1
640
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
11
6.8k
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
1k
いま中途半端なSwift 6対応をするより、Default ActorやApproachable Concurrencyを有効にしてからでいいんじゃない?
yimajo
2
440
Foundation Modelsを実装日本語学習アプリを作ってみた!
hypebeans
0
120
Go Conference 2025: Goで体感するMultipath TCP ― Go 1.24 時代の MPTCP Listener を理解する
takehaya
9
1.7k
オープンソースソフトウェアへの解像度🔬
utam0k
16
3k
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
200
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
130
Introduce Hono CLI
yusukebe
6
2.7k
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
3
900
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Balancing Empowerment & Direction
lara
5
690
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Building a Scalable Design System with Sketch
lauravandoore
463
33k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Mobile First: as difficult as doing things right
swwweet
225
10k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
35
6.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
Automating Front-end Workflow
addyosmani
1371
200k
The Invisible Side of Design
smashingmag
302
51k
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)