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
260
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
270
Building your first web app with React JS, Webpack and Babel
arunmichaeldsouza
0
450
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
740
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
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
260
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
800
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
220
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
420
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
180
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
290
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
16
8.1k
symfony/aiとlaravel/boost
77web
0
110
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
160
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.8k
スマートグラスで並列バイブコーディング
hyshu
0
270
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
200
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
150
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
240
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
180
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
630
Navigating Team Friction
lara
192
16k
Why Our Code Smells
bkeepers
PRO
340
58k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
We Are The Robots
honzajavorek
0
260
Measuring & Analyzing Core Web Vitals
bluesmoon
9
870
Color Theory Basics | Prateek | Gurzu
gurzu
0
380
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!