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
React JS Code Splitting - Why and How?
Search
Arun Michael Dsouza
June 30, 2019
Programming
270
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React JS Code Splitting - Why and How?
Slides for "React JS Code Splitting - Why and How?" workshop.
Arun Michael Dsouza
June 30, 2019
More Decks by Arun Michael Dsouza
See All by Arun Michael Dsouza
Using the Gamepad API for a Better Gaming Experience on the Web
arunmichaeldsouza
0
130
Using the Gamepad API for a better gaming experience on the web
arunmichaeldsouza
0
280
Building your first web app with React JS, Webpack and Babel
arunmichaeldsouza
0
460
React 16 & NPM, Create your own library - React Delhi NCR 07 Oct 2018 Meetup
arunmichaeldsouza
0
220
Houdini, what lies ahead - Web Weekend Kathmandu 2018
arunmichaeldsouza
0
210
Intro to React Components - React Delhi NCR 01 Jul 2018 Meetup
arunmichaeldsouza
1
750
Houdini, what lies ahead - JSConf Iceland 2018
arunmichaeldsouza
0
530
The Era of Module Bundlers - GDG Dev Fest Delhi 2017
arunmichaeldsouza
0
220
Getting started with React 16
arunmichaeldsouza
1
1.3k
Other Decks in Programming
See All in Programming
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
380
React本体のコードリーディング
high_g_engineer
1
140
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
550
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
530
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
270
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
610
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
200
5分で問診!Composer セキュリティ健康診断
codmoninc
0
1k
仕様駆動開発の消費期限
watany
20
8.5k
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
670
What's New in Android 2026
veronikapj
0
260
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
260
Featured
See All Featured
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
Optimising Largest Contentful Paint
csswizardry
37
3.9k
A Modern Web Designer's Workflow
chriscoyier
698
190k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
490
Java REST API Framework Comparison - PWX 2021
mraible
34
9.6k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
620
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
650
Leo the Paperboy
mayatellez
8
2.1k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
210
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
460
A better future with KSS
kneath
240
18k
Transcript
React JS Code Splitting - Why and How?
bit.ly/react-delhincr
Speakers/Mentors Arun Michael Dsouza @amdsouza92 Kartik Agarwal @kartikag01
Why Code Splitting?
None
None
⚠ Performance
• Multiple HTTP requests to complete • Large payload to
download • Site load speed becomes slow • Multiple files for the browser to process
hobo-web.co.uk (2018)
None
None
• Lesser HTTP requests to complete • Large payload to
download • Site load speed improves • Lesser files for the browser to process
⚠ Shipping too much too soon!
washingtonpost.com
Every byte counts!
developers.google.com
What if we ship our JavaScript on demand?
/home vendor.js home.js /settings settings.js /messages messages.js /profile profile.js
• Limited HTTP requests to complete • Less payload to
download • Site load speed improves drastically • Limited files for the browser to process
How Code Splitting Works?
Dynamic import
None
• Route-level Code-Splitting • Component-level Code-Splitting
github.com
Code Splitting Codelab
• Clone the repo • > git clone https://github.com/React-Delhi-NCR/workshop-02-react-js-code-splitting.git •
Install dependencies • > npm install • Build project and start server • > npm start • This will start the project server on http://localhost:5000
• https://developers.google.com/web/fundamentals/performance/optimizing- javascript/code-splitting/ • https://webpack.js.org/guides/code-splitting/ • https://reactjs.org/docs/code-splitting.html • https://github.com/jamiebuilds/react-loadable •
https://medium.com/front-end-weekly/webpack-and-dynamic-imports- doing-it-right-72549ff49234 • https://www.youtube.com/watch?v=0jB4YWgAxUo Further Reading
Thank you!