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
98
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
180
Django Girls 2015 - HTML
randylien
1
170
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
87
Understand front end developer
randylien
2
180
Introduce Flux & React in practice
randylien
8
450
UI Engineering Introduction
randylien
0
47
Other Decks in Programming
See All in Programming
Javaに鉄道指向プログラミング (Railway Oriented Pro gramming) のエッセンスを取り入れる/Bringing the Essence of Railway-Oriented Programming to Java
cocet33000
1
130
マテリアルって何者?RealityKitで扱うマテリアル入門
nao_randd
0
140
抽象データ型について学んだ
ryounasso
0
210
try-catchを使わないエラーハンドリング!? PHPでResult型の考え方を取り入れてみよう
kajitack
3
340
Proxmoxをまとめて管理できるコンソール作ってみました
karugamo
1
410
AI Coding Agent Enablement in TypeScript
yukukotani
17
7.2k
primeNumberでのRBS導入の現在 && RBS::Traceでinline RBSを拡充してみた
mnmandahalf
0
260
Spring gRPC で始める gRPC 入門 / Introduction to gRPC with Spring gRPC
mackey0225
0
140
推論された型の移植性エラーTS2742に挑む
teamlab
PRO
0
150
❄️ tmux-nixの実装を通して学ぶNixOSモジュール
momeemt
1
120
SpringBootにおけるオブザーバビリティのなにか
irof
1
890
型付け力を強化するための Hoogle のすゝめ / Boosting Your Type Mastery with Hoogle
guvalif
1
230
Featured
See All Featured
Building an army of robots
kneath
306
45k
The Invisible Side of Design
smashingmag
299
50k
How to Think Like a Performance Engineer
csswizardry
23
1.6k
Done Done
chrislema
184
16k
Building Adaptive Systems
keathley
41
2.6k
A better future with KSS
kneath
239
17k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.2k
Faster Mobile Websites
deanohume
307
31k
Embracing the Ebb and Flow
colly
85
4.7k
A Tale of Four Properties
chriscoyier
159
23k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
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