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
1
230
React JS Code Splitting - Why and How?
Slides for "React JS Code Splitting - Why and How?" workshop.
Arun Michael Dsouza
June 30, 2019
Tweet
Share
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
91
Using the Gamepad API for a better gaming experience on the web
arunmichaeldsouza
0
250
Building your first web app with React JS, Webpack and Babel
arunmichaeldsouza
0
370
React 16 & NPM, Create your own library - React Delhi NCR 07 Oct 2018 Meetup
arunmichaeldsouza
0
190
Houdini, what lies ahead - Web Weekend Kathmandu 2018
arunmichaeldsouza
0
180
Intro to React Components - React Delhi NCR 01 Jul 2018 Meetup
arunmichaeldsouza
1
720
Houdini, what lies ahead - JSConf Iceland 2018
arunmichaeldsouza
0
490
The Era of Module Bundlers - GDG Dev Fest Delhi 2017
arunmichaeldsouza
0
190
Getting started with React 16
arunmichaeldsouza
1
1.2k
Other Decks in Programming
See All in Programming
AIと協働し、イベントソーシングとアクターモデルで作る後悔しないアーキテクチャ Regret-Free Architecture with AI, Event Sourcing, and Actors
tomohisa
2
9.6k
JJUG CCC 2025 Fall: Virtual Thread Deep Dive
ternbusty
3
490
モデル駆動設計をやってみよう Modeling Forum2025ワークショップ/Let’s Try Model-Driven Design
haru860
0
190
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
0
610
CSC509 Lecture 13
javiergs
PRO
0
260
Flutterアプリ運用の現場で役立った監視Tips 5選
ostk0069
1
520
30分でDoctrineの仕組みと使い方を完全にマスターする / phpconkagawa 2025 Doctrine
ttskch
3
560
「正規表現をつくる」をつくる / make "make regex"
makenowjust
1
860
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
5
2.5k
手軽に積ん読を増やすには?/読みたい本と付き合うには?
o0h
PRO
1
110
Vueで学ぶデータ構造入門 リンクリストとキューでリアクティビティを捉える / Vue Data Structures: Linked Lists and Queues for Reactivity
konkarin
1
350
CloudflareのSandbox SDKを試してみた
syumai
0
180
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Visualization
eitanlees
150
16k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
How GitHub (no longer) Works
holman
315
140k
Speed Design
sergeychernyshev
33
1.3k
Automating Front-end Workflow
addyosmani
1371
200k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Building Adaptive Systems
keathley
44
2.8k
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!