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.3k
Redux 番外篇
CJ
October 20, 2018
Tweet
Share
More Decks by CJ
See All by CJ
Debug Swift debugging with LLDB
ejameslin
0
120
iOS Module Intro
ejameslin
0
81
RxSwift Intro
ejameslin
0
43
Other Decks in Programming
See All in Programming
受託開発でGitLab CI を活用していく
xiombatsg
1
270
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
470
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
370
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
330
Tailwind CSSを本気でカスタマイズする方法
fsubal
4
360
⼤規模⾔語モデルの拡張(RAG)が 終わったかも知れない件について
nearme_tech
22
15k
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
3
780
Designing for tomorrow's programming workflows
honnibal
PRO
2
110
コードレビューで学ぶ!Kotlinオブジェクト指向デザインパターン
akkie76
2
180
スキーマ駆動開発による品質とスピードの両立 - 私達は何故、スキーマを書くのか
kentaroutakeda
0
120
StoreKit2によるiOSのアプリ内課金のリニューアル
kangnux
0
100
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
430
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
354
18k
A Tale of Four Properties
chriscoyier
150
22k
Reflections from 52 weeks, 52 projects
jeffersonlam
344
19k
How GitHub (no longer) Works
holman
304
140k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
YesSQL, Process and Tooling at Scale
rocio
163
13k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
13
1.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
15
2.6k
Docker and Python
trallard
33
2.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
242
12k
What the flash - Photography Introduction
edds
64
11k
Infographics Made Easy
chrislema
237
18k
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!