Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Redux 番外篇
Search
CJ
October 20, 2018
Programming
1.5k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Redux 番外篇
CJ
October 20, 2018
Transcript
11 slides
IOS REDUX 番外篇 CJ LIN LINE TW IOS NERD
Why Redux
Redux Intro
Preferred Architecture MVVM + Redux + Data Normalization
Reducer design Reducer signature func reducer(action: Action, state: State) ->
State Reducer, Pure Function: state needs to be copied and modified Performance of `Copy`?
ReSwift Implementation
Swift Struct Copy Struct copy is super fast! Copy-on-write:
usually the modification is not much
Swift / ObjC Class Copy Shallow Copy: Not worked… True
Deep Copy • ObjC: NSKeyedArchiver & NSKeyedUnarchiver • Swift: Codable & JSONEncoder & JSONDecoder • 2000X+ slower
Swift / ObjC Class Copy Deep Copy with NSCopying •
copyWithZone: • init(array:copyItems:) • Faster
Redux State Design Use struct! Eliminate duplicates State Normalization (Data
shared in multi ViewControllers) Substate? Release unused / outdated data?
WE ARE HIRING!
More Decks by CJ
See All by CJ
Debug Swift debugging with LLDB
ejameslin
0
210
iOS Module Intro
ejameslin
0
110
RxSwift Intro
ejameslin
0
67
Other Decks in Programming
See All in Programming
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
140
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
270
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
1
450
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
620
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
16
9.2k
Getting Started with Vibe Coding
miccheng
0
220
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
2.4k
Seven New Principles of Software Engineering
yegor256
0
500
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
340
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.9k
はじめてのPLATEAU
nokonoko1203
1
650
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
380
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
900
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
840
30 Presentation Tips
portentint
PRO
1
470
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
520
Embracing the Ebb and Flow
colly
88
5.2k
Are puppies a ranking factor?
jonoalderson
2
4.2k
GraphQLとの向き合い方2022年版
quramy
50
15k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k