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
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
170
iOS Module Intro
ejameslin
0
90
RxSwift Intro
ejameslin
0
58
Other Decks in Programming
See All in Programming
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
Patterns of Patterns
denyspoltorak
0
1.3k
CSC307 Lecture 06
javiergs
PRO
0
680
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
12
6.4k
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
CSC307 Lecture 03
javiergs
PRO
1
490
Apache Iceberg V3 and migration to V3
tomtanaka
0
140
Architectural Extensions
denyspoltorak
0
270
CSC307 Lecture 05
javiergs
PRO
0
490
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Faster Mobile Websites
deanohume
310
31k
The browser strikes back
jonoalderson
0
360
Six Lessons from altMBA
skipperchong
29
4.1k
Producing Creativity
orderedlist
PRO
348
40k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Rails Girls Zürich Keynote
gr2m
96
14k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Done Done
chrislema
186
16k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
270
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!