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
200
iOS Module Intro
ejameslin
0
100
RxSwift Intro
ejameslin
0
63
Other Decks in Programming
See All in Programming
継続モナドとリアクティブプログラミング
yukikurage
3
680
Foundation Models frameworkで画像分析
ryodeveloper
1
510
テーブルをDELETEした
yuzneri
0
130
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
200
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
810
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
450
『コードを書く以外の』エンジニアリング〜課金基盤移行プロジェクト推進のためのTips4選
yuriko1211
0
570
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
230
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
480
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
4
1.2k
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
650
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
1
270
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
200
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
400
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
420
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
510
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
How to Think Like a Performance Engineer
csswizardry
28
2.7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
WENDY [Excerpt]
tessaabrams
11
39k
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!