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
170
iOS Module Intro
ejameslin
0
90
RxSwift Intro
ejameslin
0
58
Other Decks in Programming
See All in Programming
SourceGeneratorのマーカー属性問題について
htkym
0
210
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
950
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.4k
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
420
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
150
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
1.1k
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
240
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
390
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
440
Feature Toggle は捨てやすく使おう
gennei
0
320
How to stabilize UI tests using XCTest
akkeylab
0
140
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
150
Featured
See All Featured
Context Engineering - Making Every Token Count
addyosmani
9
770
Six Lessons from altMBA
skipperchong
29
4.2k
Speed Design
sergeychernyshev
33
1.6k
Un-Boring Meetings
codingconduct
0
240
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
240
Accessibility Awareness
sabderemane
0
84
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
240
What's in a price? How to price your products and services
michaelherold
247
13k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
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!