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
91
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
200
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
43
Other Decks in Programming
See All in Programming
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
190
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
Spatial Rendering for Apple Vision Pro
warrenm
0
110
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
3
500
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
160
創造的活動から切り拓く新たなキャリア 好きから始めてみる夜勤オペレーターからSREへの転身
yjszk
1
130
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
780
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
480
ドメインイベント増えすぎ問題
h0r15h0
2
360
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
What's in a price? How to price your products and services
michaelherold
243
12k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
The Language of Interfaces
destraynor
154
24k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Unsuck your backbone
ammeep
669
57k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
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