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
All About Angular's New Signal Forms
manfredsteyer
PRO
0
190
CSC509 Lecture 04
javiergs
PRO
0
300
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
230
CSC509 Lecture 05
javiergs
PRO
0
300
AI駆動で0→1をやって見えた光と伸びしろ
passion0102
1
480
Catch Up: Go Style Guide Update
andpad
0
230
はじめてのDSPy - 言語モデルを『プロンプト』ではなく『プログラミング』するための仕組み
masahiro_nishimi
3
660
他言語経験者が Golangci-lint を最初のコーディングメンターにした話 / How Golangci-lint Became My First Coding Mentor: A Story from a Polyglot Programmer
uma31
0
250
Foundation Modelsを実装日本語学習アプリを作ってみた!
hypebeans
0
120
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
3.4k
Range on Rails ―「多重範囲型」という新たな選択肢が、複雑ロジックを劇的にシンプルにしたワケ
rizap_tech
0
6.7k
Devoxx BE 2025 Loom lab
josepaumard
0
100
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
The Cult of Friendly URLs
andyhume
79
6.6k
Documentation Writing (for coders)
carmenintech
75
5.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Why Our Code Smells
bkeepers
PRO
340
57k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
Fireside Chat
paigeccino
40
3.7k
Git: the NoSQL Database
bkeepers
PRO
431
66k
The Invisible Side of Design
smashingmag
302
51k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
369
20k
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!