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
1.5k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Redux 番外篇
CJ
October 20, 2018
More Decks by CJ
See All by CJ
Debug Swift debugging with LLDB
ejameslin
0
190
iOS Module Intro
ejameslin
0
99
RxSwift Intro
ejameslin
0
63
Other Decks in Programming
See All in Programming
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
400
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
710
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.1k
JavaDoc 再入門
nagise
1
370
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
410
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.3k
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
6.7k
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
130
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
270
RTSPクライアントを自作してみた話
simotin13
0
610
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
250
Contextとはなにか
chiroruxx
1
330
Featured
See All Featured
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
310
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
780
From π to Pie charts
rasagy
0
210
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
How STYLIGHT went responsive
nonsquared
100
6.2k
Navigating Team Friction
lara
192
16k
Automating Front-end Workflow
addyosmani
1370
210k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
840
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
210
Writing Fast Ruby
sferik
630
63k
Everyday Curiosity
cassininazir
0
230
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!