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
Why use Redux in iOS
Search
yohei sugigami
March 22, 2018
Technology
5
2.6k
Why use Redux in iOS
yohei sugigami
March 22, 2018
Tweet
Share
More Decks by yohei sugigami
See All by yohei sugigami
Snapshot Testing in iOS
susieyy
6
3.2k
Redux with iOS
susieyy
0
1.2k
ReduxRxを活用したアプリアーキテクチャ
susieyy
8
2.3k
Redux+Rxを活用したiOSアプリアーキテクチャ
susieyy
10
2k
Swaggerで始めるAPI定義管理とコードジェネレート
susieyy
14
7.5k
開発中のアプリをXcode9 & Swift4に移行しました
susieyy
0
3.7k
Wantedly People ViewModel and Rx
susieyy
7
7.1k
ReduxDevTools' power to the iOS development
susieyy
0
840
Realm Centered Design
susieyy
5
840
Other Decks in Technology
See All in Technology
非エンジニアにも伝えるメールセキュリティ / Email security for non-engineers
ykanoh
13
3.9k
KCD Brazil '25: Enabling Developers with Dapr & Backstage
salaboy
1
120
Vision Language Modelを活用した メルカリの類似画像レコメンドの性能改善
yadayuki
9
1.2k
頻繁リリース × 高品質 = 無理ゲー? いや、できます!/20250306 Shoki Hyo
shift_evolve
0
150
Keynote - KCD Brazil - Platform Engineering on K8s (portuguese)
salaboy
0
120
Amazon EKS Auto ModeでKubernetesの運用をシンプルにする
sshota0809
0
110
ペアプログラミングにQAが加わった!職能を超えたモブプログラミングの事例と学び
tonionagauzzi
1
140
Compose MultiplatformにおけるiOSネイティブ実装のベストプラクティス
enomotok
1
210
パスキー導入の課題と ベストプラクティス、今後の展望
ritou
7
1.2k
LINE API Deep Dive Q1 2025: Unlocking New Possibilities
linedevth
1
160
Road to SRE NEXT@仙台 IVRyの組織の形とSLO運用の現状
abnoumaru
0
390
パスキーでのログインを 実装してみよう!
hibiki_cube
0
660
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
12
610
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
177
52k
The Cult of Friendly URLs
andyhume
78
6.3k
We Have a Design System, Now What?
morganepeng
51
7.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
470
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
Transcript
ɹ ɹ Why use Redux in iOS ɹ ɹ ɹ
iOS Flux/Reduxษڧձ 2018/03/22@Wantedly Yohei Suginami ( @susieyy )
Profile — Yohei Sugigami — susieyy — Twitter / Qiita
/ Github — New app development specialist — Clients — Folio.inc — New app developer — Wantedly.inc — Technical advisor
ɹ ɹ ɹ ɹ Flux/ReduxΓ্͕ͬͯ·͢Ͷʂ
ɹ ɹ ɹ ɹ ϨΩγΛৼΓฦΔ
None
None
None
None
None
None
None
None
None
None
ɹ ɹ ɹ ɹ ຊͰ࠾༻ࣄྫ͕૿͑ͯ·͢Ͷʂ
ɹ ɹ ͳͥReduxͳͷ͔
ɹ ɹ ΞϓϦ։ൃʹ͓͚Δ ࠷େͷ՝ɹɹɹ
ɹ ɹ ෳࡶͰ͋Δ͜ͱ
Ͳ͏γϯϓϧʹམͱ͠ࠐΉ͔ɹɹɹ ɹ ɹ ɹ ɹ ѲɾཧͰ͖ΔΑ͏ʹ͢Δ͔
ΞϓϦ։ൃʹ͓͚Δෳࡶੑͱ खଓ͖తهड़ʹΑΔॲཧͷྲྀΕͷѲͷ͠ʹ͘͞ — σϦήʔτύλʔϯͷίʔϧόοΫࠈ — ϑΝοτίϯτϩʔϥʔ
ΞϓϦ։ൃʹ͓͚Δෳࡶੑͱ Өڹൣғͷෆ͔֬͞ɺہॴԽ͞ΕͣҬͳӨڹൣғ — γϯάϧτϯʢάϩʔόϧมͷଟ༻ʣ
ΞϓϦ։ൃʹ͓͚Δෳࡶੑͱ ଟ༷ͳঢ়ଶͷදݱͷͨΊʹଟͷذͱଟͷมͷग़ݱ — ม͕มԽ͢ΔཁҼ͕ࡏԽ — ݅ذʹ্༷ભҠ͠ͳ͍ܦ࿏ؚ·ΕΔ
ॾѱͷࠜݯMVC ෳࡶੑͷղܾࡦΛMVCʹมΘΔΞʔΩςΫνϟٻΊͨ — MVVMʢCʣʴFRP — CleanAcrhitecture / Viper — Flux
/ Redux
MVVMʢCʣʴFRP ෳࡶੑͷରቂ — ϦΞΫςΟϒͳؔʹநԽ͠ɺతͰએݴతͳهड़ — ࿈ଓ͢Δ૬ޓ࡞༻Λѻ͍͍͢ — ঢ়ଶอ࣋ͷͨΊͷมΛݮ — ↑
RxͷετϦʔϜʹแ — ඇಉظΛབྷΊͨॲཧͷՄಡੑߴ͍දݱྗ — εϐʔυײ͋Δ։ൃ
MVVMʢCʣʴFRP σϝϦοτ — ߴ͍ͷநԽʹΑΔهड़қͷ্ঢ — ෳࡶͳRxͷΦϖϨʔλʔΛۦ͢Δ͜ͱͰ͔͑ͬͯڍಈ͕ Θ͔Γʹ͍͘ — ϚϧνεϨουͳॲཧ֤ετϦʔϜͰಠཱతʹಈ࡞͢Δ —
هड़ྗߴ͍͕ಈ࡞ͷѲɾσόοά͠ʹ͍͘
CleanAcrhitecture / Viper ෳࡶੑͷରቂ — ΦϒδΣΫτࢦͷׂͰγϯϓϧʹམͱ͠ࠐΉ — ϨΠϠʔׂɾґଘͷࢦੑ — ϨΠϠʔͷΠϯλʔϑΣΠεͱ࣮ͷʹΑΔநԽ
— νʔϜεέʔϥϏϦςΟͷ্
CleanAcrhitecture / Viper σϝϦοτ — ʹΑΔهड़ྔ͕૿͑Δίʔυ — ։ൃεϐʔυͷݮ — ঢ়ଶͱखଓ͖ΛΧϓηϧԽʹΑΔγϯϓϧԽͷݶք
ɹ ɹ ReduxͱԿ͔
None
None
Մಡੑͷ্ ॻ͘ίετΑΓɺಡΉίετΛԼ͛Δ — ಡΈ͘͢ɺΓ͍ͨ͜ͱɾॲཧ͕Ѳ͍͢͠ — Өڹൣғ͕ਪఆ͍͢͠ — ϨϏϡʔ͍͢͠ — εϐʔυײ͋Δ։ൃ
— ΞϓϦنͱνʔϜߏͷεέʔϥϏϦςΟͷ্
Viewͱঢ়ଶͷશͳΔ — ViewͷॲཧͰͦͷॠؒͷΞϓϦͷͯ͢ͷঢ়ଶ ʢState)͕ҰҙͰ͋Δ͜ͱΛอূ͞ΕΔ — StateΠϛϡʔλϒϧ — ͦͷॠؒͷঢ়ଶʹରͯ͠ඇಉظͷհೖ͕ͳ͍ — ViewʹStateΔͱදࣔҰҙʹܾ·Δ
— View͕ؔܕࢦʹͳΔ
७ਮؔ — ೖྗʹରͯ݁͠Ռ͕ҰҙͰ͋Δ — ϓϩάϥϛϯάʹ͓͍ͯϩδοΫΛγϯϓϧѻ͏ͨΊͷۃ Έ — ෭࡞༻ഉআͱ — ςελϏϦςΟ্
Ϛγϯύϫʔ্͕͕ͬͨ͜ͱʹΑΔ߽తͳΞʔΩςΫνϟ ϚγϯύϫʔΛ͏·͘ར༻͢Δ͜ͱͰγϯϓϧΛ࣮ݱ͍ͯ͠Δ ॲཧͷྻԽ - ϝΠϯεϨου্ͰϏδωεϩδοΫ(ߋ৽ॲཧ)ͷಈ࡞ - γϯάϧϝΠϯεϨου͚ͩͰಈ࡞͍ͯ͠ΔΑ͏ͳײ֮ͰΞ ϓϦ͕ॻ͚Δ Viewͷޮతͳߋ৽ͷͨΊͷࠩݕίετ -
ϏδωεϩδοΫॲཧޙͷViewͷӨڹൣғΛؔ͠ͳ͍
Swi!ݴޠͱͷ૬ੑͷྑ͞ — TypeSafe — Struct / Immutable — ComputedProperty —
Enum / PatternMatch — Generics — Functional Oriented — Protocol Oriented
σόοά༰қੑ ɹ DEMO
Redux՝ — ΞΫγϣϯͷॱংੑΛ੍͚͍ͮͨʢεςʔτϚγϯʣ — Actionϧʔϓ — StateͷΠχγϟϥΠζͱΦϓγϣϯφϧ — ϝϞϦϚωδϝϯτʢը໘ഁغ࣌ʹ෦Stateͷഁغʣ —
Viewͷޮతͳߋ৽ͷͨΊͷࠩߋ৽ʢվળͷ༨͋Γʣ
ReduxۜͷؙͰͳ͍ ɹ ɹ ɹ దࡐ͔Ͳ͏͔ɹɹɹɹɹ ΞϓϦཁ݅ɺ࣭ཁ݅ɹɹɹɹ νʔϜߏɺ։ൃظؒ࣍ୈɹɹ
·ͱΊ Reduxඇৗʹݫ֨ɾݎ࿚Ͱ͋ΓγϯϓϧͳϩδοΫܗ — ७ਮؔ — Πϛϡʔλϒϧ — ୯Ұࢦੑϑϩʔ ʢ ϚϧνεϨουͷہॴԽ
ʣ — ෭࡞༻ʢඇಉظॲཧʣͷہॴԽ
߹ΘͤͯಡΈ͍࣮ͨફฤ ɹ Redux+RxΛ׆༻ͨ͠ΞϓϦΞʔ ΩςΫνϟ CA.swi! #5 2018/01/25@גࣜձࣾαΠόʔΤʔδΣϯτ Yohei Suginami (
@susieyy )