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
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
570
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
340
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
910
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
440
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
110
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
240
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.5k
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
120
nilとは何か 〜interfaceの構造とnil!=nilから理解する〜
kuro_kurorrr
3
1.9k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
290
CSC307 Lecture 14
javiergs
PRO
0
470
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
230
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
140
Deep Space Network (abreviated)
tonyrice
0
90
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
200
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
240
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
470
Fireside Chat
paigeccino
42
3.8k
RailsConf 2023
tenderlove
30
1.4k
Building the Perfect Custom Keyboard
takai
2
710
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
53k
Code Review Best Practice
trishagee
74
20k
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!