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
print("Hello, World")
eddie
2
530
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
3.3k
はじめてのMaterial3 Expressive
ym223
2
900
意外と簡単!?フロントエンドでパスキー認証を実現する WebAuthn
teamlab
PRO
2
770
FindyにおけるTakumi活用と脆弱性管理のこれから
rvirus0817
0
540
Swift Updates - Learn Languages 2025
koher
2
510
Namespace and Its Future
tagomoris
6
710
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
24
12k
AIと私たちの学習の変化を考える - Claude Codeの学習モードを例に
azukiazusa1
11
4.4k
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
250
デザイナーが Androidエンジニアに 挑戦してみた
874wokiite
0
550
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
40
2k
The Power of CSS Pseudo Elements
geoffreycrofte
77
6k
Balancing Empowerment & Direction
lara
3
620
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.7k
How GitHub (no longer) Works
holman
315
140k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Building Adaptive Systems
keathley
43
2.7k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
850
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Practical Orchestrator
shlominoach
190
11k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Done Done
chrislema
185
16k
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!