Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Redux 番外篇
Search
CJ
October 20, 2018
Programming
0
1.4k
Redux 番外篇
CJ
October 20, 2018
Tweet
Share
More Decks by CJ
See All by CJ
Debug Swift debugging with LLDB
ejameslin
0
160
iOS Module Intro
ejameslin
0
89
RxSwift Intro
ejameslin
0
57
Other Decks in Programming
See All in Programming
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
140
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
160
JETLS.jl ─ A New Language Server for Julia
abap34
2
440
愛される翻訳の秘訣
kishikawakatsumi
3
340
SwiftUIで本格音ゲー実装してみた
hypebeans
0
490
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
170
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
140
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
270
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
190
FluorTracer / RayTracingCamp11
kugimasa
0
250
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3k
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
280
Featured
See All Featured
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
110
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
110
Building AI with AI
inesmontani
PRO
1
570
Thoughts on Productivity
jonyablonski
73
5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The Cult of Friendly URLs
andyhume
79
6.7k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
310
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
34
エンジニアに許された特別な時間の終わり
watany
105
220k
Tell your own story through comics
letsgokoyo
0
760
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
90
Utilizing Notion as your number one productivity tool
mfonobong
2
190
Transcript
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!