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
木藤紘介/Kosuke Kito
April 17, 2018
Programming
1
88
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
AIプログラマーDevinは PHPerの夢を見るか?
shinyasaita
1
170
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
980
Goで作る、開発・CI環境
sin392
0
170
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.4k
ASP.NETアプリケーションのモダナイズ インフラ編
tomokusaba
1
420
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
320
すべてのコンテキストを、 ユーザー価値に変える
applism118
2
960
#QiitaBash MCPのセキュリティ
ryosukedtomita
0
250
Select API from Kotlin Coroutine
jmatsu
1
190
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
1
130
20250628_非エンジニアがバイブコーディングしてみた
ponponmikankan
0
520
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
320
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.9k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Practical Orchestrator
shlominoach
188
11k
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.4k
Faster Mobile Websites
deanohume
307
31k
The World Runs on Bad Software
bkeepers
PRO
69
11k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
GitHub's CSS Performance
jonrohan
1031
460k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
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ͳΒͰͷݒ೦ϥΠϒϥϦͰΧόʔͰ͖Δ͖ ײ
͖