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
Lessons learnt from a React performance nightmare
Search
Chinenye Onuegbu
October 30, 2019
Programming
0
29
Lessons learnt from a React performance nightmare
Presented at ITNEXT SUMMIT in Amsterdam on 30 Oct 2019
Chinenye Onuegbu
October 30, 2019
Tweet
Share
More Decks by Chinenye Onuegbu
See All by Chinenye Onuegbu
Multi-threading in JavaScript
xkizer
0
110
Other Decks in Programming
See All in Programming
たった 1 枚の PHP ファイルで実装する MCP サーバ / MCP Server with Vanilla PHP
okashoi
1
220
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
410
Discover Metal 4
rei315
2
110
VS Code Update for GitHub Copilot
74th
1
490
来たるべき 8.0 に備えて React 19 新機能と React Router 固有機能の取捨選択とすり合わせを考える
oukayuka
2
880
C++20 射影変換
faithandbrave
0
550
Team operations that are not burdened by SRE
kazatohiei
1
290
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
610
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
380
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
2
320
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
680
Cursor AI Agentと伴走する アプリケーションの高速リプレイス
daisuketakeda
1
130
Featured
See All Featured
Scaling GitHub
holman
459
140k
The Pragmatic Product Professional
lauravandoore
35
6.7k
Docker and Python
trallard
44
3.4k
The Cult of Friendly URLs
andyhume
79
6.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Become a Pro
speakerdeck
PRO
28
5.4k
Making Projects Easy
brettharned
116
6.3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
Transcript
@xkizer Lessons learnt from a React performance nightmare Chinenye Onuegbu
Senior Frontend Engineer, Yilu Amsterdam | October 30, 2019
@xkizer The situation...
@xkizer The situation... ➔ Two experienced JS developers ➔ Newbie
React developers ➔ A back-office application
@xkizer
@xkizer The back-office app The situation... ➔ At least 26
weeks at a time ➔ Up to 50 cards per week ➔ Infinite scrolling ➔ One Redux store ➔ State must be serializable
@xkizer tiny.cc/38iwez Code Samples:
@xkizer Wasted renders are pure evil Lesson One
@xkizer
@xkizer Wasted renders are pure evil Wasted renders are harder
to detect than they sound
@xkizer Data transforms can be problematic Lesson Two
@xkizer <CodeSample filepattern=”data-transform-*.tsx” /> Data transforms can be problematic
@xkizer Data transforms can be problematic Recommended library: Redux reselect
https://github.com/reduxjs/reselect
@xkizer Data Structures are very important! Lesson Three
@xkizer Selected Campaign
@xkizer <CodeSample filepattern=”active-campaign-*.tsx” /> Data Structures are very important!
@xkizer Data Structures are very important! Data structures that are
good for general purpose JS may not be good for React
@xkizer Prop lifting can compound issues Lesson Four
@xkizer
@xkizer Prop lifting can compound issues http://example.com/users/abcd1234 Vs http://example.com/users?username=test&
[email protected]
&userId=abcd1234
@xkizer <CodeSample filepattern=”props-passed-*.tsx” /> Prop lifting can compound issues
@xkizer Prop lifting can compound issues Inject props close to
where they’re needed
@xkizer Prop lifting can compound issues Pass down only props
that can’t be easily derived
@xkizer Micro-optimisations are not important in the grand scheme of
things Worthy mention...
@xkizer Thank You!