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
89
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
SourceGeneratorのススメ
htkym
0
190
高速開発のためのコード整理術
sutetotanuki
1
400
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
Implementation Patterns
denyspoltorak
0
280
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
2026年 エンジニアリング自己学習法
yumechi
0
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
CSC307 Lecture 09
javiergs
PRO
1
830
ThorVG Viewer In VS Code
nors
0
770
Oxlintはいいぞ
yug1224
5
1.3k
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.2k
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
Producing Creativity
orderedlist
PRO
348
40k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
250
Side Projects
sachag
455
43k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
It's Worth the Effort
3n
188
29k
Being A Developer After 40
akosma
91
590k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
110
Balancing Empowerment & Direction
lara
5
890
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
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ͳΒͰͷݒ೦ϥΠϒϥϦͰΧόʔͰ͖Δ͖ ײ
͖