$30 off During Our Annual Pro Sale. View Details »
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
89
RxSwift Intro
ejameslin
0
57
Other Decks in Programming
See All in Programming
Level up your Gemini CLI - D&D Style!
palladius
1
170
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.3k
AIコーディングエージェント(Manus)
kondai24
0
120
無秩序からの脱却 / Emergence from chaos
nrslib
2
12k
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
5
260
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
110
関数の挙動書き換える
takatofukui
4
770
Reactive Thinking with Signals and the new Resource API
manfredsteyer
PRO
0
160
20 years of Symfony, what's next?
fabpot
2
310
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
5
1.1k
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
310
社内オペレーション改善のためのTypeScript / TSKaigi Hokuriku 2025
dachi023
1
470
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Unsuck your backbone
ammeep
671
58k
A Tale of Four Properties
chriscoyier
162
23k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Faster Mobile Websites
deanohume
310
31k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Typedesign – Prime Four
hannesfritz
42
2.9k
Scaling GitHub
holman
464
140k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Mobile First: as difficult as doing things right
swwweet
225
10k
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!