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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
180
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
750
dchart: charts from deck markup
ajstarks
3
1k
生成AIを活用したソフトウェア開発ライフサイクル変革の現在値
hiroyukimori
PRO
0
100
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
140
CSC307 Lecture 04
javiergs
PRO
0
660
Oxlintはいいぞ
yug1224
5
1.4k
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
310
CSC307 Lecture 09
javiergs
PRO
1
840
Package Management Learnings from Homebrew
mikemcquaid
0
230
Featured
See All Featured
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
190
Building AI with AI
inesmontani
PRO
1
700
Music & Morning Musume
bryan
47
7.1k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
240
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
30 Presentation Tips
portentint
PRO
1
220
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
BBQ
matthewcrist
89
10k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
740
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Darren the Foodie - Storyboard
khoart
PRO
2
2.4k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
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!