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
34
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
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
510
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
ぼくの開発環境2026
yuzneri
0
110
CSC307 Lecture 05
javiergs
PRO
0
500
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
690
Patterns of Patterns
denyspoltorak
0
1.4k
Implementation Patterns
denyspoltorak
0
280
CSC307 Lecture 06
javiergs
PRO
0
680
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
250
Featured
See All Featured
Practical Orchestrator
shlominoach
191
11k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
Ethics towards AI in product and experience design
skipperchong
2
190
Thoughts on Productivity
jonyablonski
74
5k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
170
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
170
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
The World Runs on Bad Software
bkeepers
PRO
72
12k
How STYLIGHT went responsive
nonsquared
100
6k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
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!