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
Immutable, Performance and Component Communication
Search
Randy Lien
March 23, 2015
Programming
0
93
Immutable, Performance and Component Communication
React.JS TW fifth meetup
Randy Lien
March 23, 2015
Tweet
Share
More Decks by Randy Lien
See All by Randy Lien
The ideas of Clojure - Things I learn from Clojure
randylien
0
170
Django Girls 2015 - HTML
randylien
1
160
Django Girls 2015 - CSS
randylien
1
110
React.JS Conf & f8
randylien
1
210
Introduce Flux & React in KKBOX
randylien
6
430
What is the next step for a front end beginner
randylien
1
84
Understand front end developer
randylien
2
180
Introduce Flux & React in practice
randylien
8
450
UI Engineering Introduction
randylien
0
44
Other Decks in Programming
See All in Programming
ML.NETで始める機械学習
ymd65536
0
120
もう僕は OpenAPI を書きたくない
sgash708
5
1.8k
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
7
740
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
110
Conform を推す - Advocating for Conform
mizoguchicoji
3
690
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
120
仕様変更に耐えるための"今の"DRY原則を考える / Rethinking the "Don't repeat yourself" for resilience to specification changes
mkmk884
4
710
XStateを用いた堅牢なReact Components設計~複雑なClient Stateをシンプルに~ @React Tokyo ミートアップ #2
kfurusho
1
920
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
120
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
9
1.8k
定理証明プラットフォーム lapisla.net
abap34
1
1.8k
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
The Invisible Side of Design
smashingmag
299
50k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
9
450
Testing 201, or: Great Expectations
jmmastey
42
7.2k
Speed Design
sergeychernyshev
27
790
Documentation Writing (for coders)
carmenintech
67
4.6k
Practical Orchestrator
shlominoach
186
10k
Writing Fast Ruby
sferik
628
61k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Transcript
Immutable Performance Randy Lien @React.JS TW 第五次⼩小聚
About Me • @randylien • Front end developer
Agenda • Immutable • Performance • Components Communication • Conclusion
Functional Programming
None
Why Immutable? • Immutable data has no side effect! •
Shared mutable state is the root of all evil - Pete Hunt • You will not get hurt by yourself or someone
None
Why Immutable? (cont.) • Immutable.js is fast enough and memory
optimisation • Why Om is faster ? Data or Value is immutable in Clojure/ClojureScript • Immutable + PureRenderMixin
Simple Made Easy
Performance
Performance • Pure Component (prop & state) • shouldComponentUpdate •
Don’t update when its the same
Performance (cont.) • Container Component Pattern • Container Component as
Data Layer • Data fetching • Component is all about its behaviour • Testing Container or Gallery Container
Components Communication
How to Communicate • Parent - Children • Use Callbacks
• No relationship • Global event hub • Flux • Codecademy • Adapter, broadcast • Channel (CSP) • Cursor (react-cursor)
None
Conclusion
Conclusion • Embracing Immutable data for the future (JavaScript) development
• Componentize your User Interface • Loose coupling your component • Container Component • General Component • You can pick the suitable solution for your needs
None
Conclusion(cont.) • Watch Simple made easy • Try Clojure/ClojureScript
FAQ