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.7k
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.3k
ReduxRxを活用したアプリアーキテクチャ
susieyy
8
2.3k
Redux+Rxを活用したiOSアプリアーキテクチャ
susieyy
10
2.1k
Swaggerで始めるAPI定義管理とコードジェネレート
susieyy
14
7.5k
開発中のアプリをXcode9 & Swift4に移行しました
susieyy
0
3.7k
Wantedly People ViewModel and Rx
susieyy
7
7.2k
ReduxDevTools' power to the iOS development
susieyy
0
870
Realm Centered Design
susieyy
5
880
Other Decks in Technology
See All in Technology
SREのためのeBPF活用ステップアップガイド
egmc
2
1.3k
本当にわかりやすいAIエージェント入門
segavvy
1
300
How Do I Contact Jetblue Airlines® Reservation Number: Fast Support Guide
thejetblueairhelpsupport
0
150
“日本一のM&A企業”を支える、少人数SREの効率化戦略 / SRE NEXT 2025
genda
1
270
モニタリング統一への道のり - 分散モニタリングツール統合のためのオブザーバビリティプロジェクト
niftycorp
PRO
1
520
american aa airlines®️ USA Contact Numbers: Complete 2025 Support Guide
aaguide
0
500
ClaudeCode_vs_GeminiCLI_Terraformで比較してみた
tkikuchi
1
940
【あのMCPって、どんな処理してるの?】 AWS CDKでの開発で便利なAWS MCP Servers特集
yoshimi0227
6
950
cdk initで生成されるあのファイル達は何なのか/cdk-init-generated-files
tomoki10
1
670
Introduction to Bill One Development Engineer
sansan33
PRO
0
260
クラウド開発の舞台裏とSRE文化の醸成 / SRE NEXT 2025 Lunch Session
kazeburo
1
580
ClaudeCodeにキレない技術
gtnao
1
860
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Become a Pro
speakerdeck
PRO
29
5.4k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
A Tale of Four Properties
chriscoyier
160
23k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
The Language of Interfaces
destraynor
158
25k
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 )