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
160
iOS Module Intro
ejameslin
0
88
RxSwift Intro
ejameslin
0
56
Other Decks in Programming
See All in Programming
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
JSONataを使ってみよう Step Functionsが楽しくなる実践テクニック #devio2025
dafujii
1
530
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
1.3k
Ruby Parser progress report 2025
yui_knk
1
440
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
240
250830 IaCの選定~AWS SAMのLambdaをECSに乗り換えたときの備忘録~
east_takumi
0
390
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
24
12k
MCPとデザインシステムに立脚したデザインと実装の融合
yukukotani
4
1.4k
The Past, Present, and Future of Enterprise Java with ASF in the Middle
ivargrimstad
0
120
デザイナーが Androidエンジニアに 挑戦してみた
874wokiite
0
470
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
380
個人軟體時代
ethanhuang13
0
320
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
36
6.9k
Building an army of robots
kneath
306
46k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
RailsConf 2023
tenderlove
30
1.2k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
The Power of CSS Pseudo Elements
geoffreycrofte
77
6k
The Invisible Side of Design
smashingmag
301
51k
Scaling GitHub
holman
463
140k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
GraphQLとの向き合い方2022年版
quramy
49
14k
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!