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
iOS de Redux
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
木藤紘介/Kosuke Kito
April 17, 2018
Programming
1
91
iOS de Redux
2018/04/13
社内他職種エンジニア向けLT
木藤紘介/Kosuke Kito
April 17, 2018
Tweet
Share
More Decks by 木藤紘介/Kosuke Kito
See All by 木藤紘介/Kosuke Kito
Flutter with Redux
kitoko552
3
1.2k
Other Decks in Programming
See All in Programming
文字コードの話
qnighy
44
17k
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
550
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
400
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
230
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
140
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
230
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
240
AHC061解説
shun_pi
0
380
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
150
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
860
CSC307 Lecture 15
javiergs
PRO
0
250
Featured
See All Featured
Test your architecture with Archunit
thirion
1
2.2k
Facilitating Awesome Meetings
lara
57
6.8k
What does AI have to do with Human Rights?
axbom
PRO
1
2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
240
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
100
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
120
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
From π to Pie charts
rasagy
0
150
Designing Experiences People Love
moore
143
24k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
150
Transcript
iOS de Redux Kosuke Kito
Kosuke Kito ͍͖ͳΓεςʔΩΰʔϧυձһ
Redux
Fluxͷ֦ு
Flux???
άάϨΧε
- Single source of truth - State is read-only -
Mutations are written as pure function Redux three principles
Single source truth ΞϓϦέʔγϣϯશମͷঢ়ଶΛ ͭͷΦϒδΣΫτπϦʔʢ4UPSFʣ Ͱදݱ͢ΔΑʂ
State is read-only 4UBUFಡΈऔΓઐ༻ͩΑʂ ঢ়ଶΛม͍͑ͨ߹"DUJPOΛൃߦͯ͠Ͷʂ
Mutations are written as pure function ঢ়ଶมߋʹ७ਮؔʢ3FEVDFSʣΛ͓͏Ͷʂ 3FEVDFS"DUJPOͱ4UBUFΛड͚औͬͯ ৽͍͠4UBUFΛฦ͢Αʂ
https://qiita.com/susieyy/items/23d44f28c6a6915c58e2
iOSͰ࠾༻͢Δʹʁ
ReSwift https://github.com/ReSwift/ReSwift
None
͜Ε͚ͩ
Action
public protocol Action { }
public protocol Action { } ͜Ε͚ͩ
State
public protocol StateType { }
public protocol StateType { } ͜Ε͚ͩ
Reducer
public typealias Reducer<ReducerStateType> = (_ action: Action, _ state: ReducerStateType?)
-> ReducerStateType
public typealias Reducer<ReducerStateType> = (_ action: Action, _ state: ReducerStateType?)
-> ReducerStateType ͜Ε͚ͩ
ReSwiftجຊతʹ ΈΛఏڙ͢Δ͚ͩ ※Store͔ͬ͠Γॻ͔Εͯ·͢
͖
͕ɺ
ݒ೦
- ࠩߋ৽ͭΒ͍ - Stateͷ௨Λड͚औΔͨΊʹView͝ͱʹ Delegate४ڌͤ͞ΔͷͭΒ͍ ݒ೦
- ࠩߋ৽ͭΒ͍ => IGListKit or RxDataSources - Stateͷ௨Λड͚औΔͨΊʹView͝ͱʹ Delegate४ڌͤ͞ΔͷͭΒ͍ =>
RxSwift ݒ೦
None
- ͦΕͧΕͷΫϥεͷ͕໌͔֬ͭ΄ͲΑ͍αΠζ Ͱ͖ - ݫ͗͢͠ͳ͍΄ͲΑ͍ϧʔϧ͕͖ - ୯Ұํͷσʔλϑϩʔ͖ - iOSͳΒͰͷݒ೦ϥΠϒϥϦͰΧόʔͰ͖Δ͖ ײ
͖