Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
94
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
410
React 16 & NPM, Create your own library - React Delhi NCR 07 Oct 2018 Meetup
arunmichaeldsouza
0
200
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
500
The Era of Module Bundlers - GDG Dev Fest Delhi 2017
arunmichaeldsouza
0
200
Getting started with React 16
arunmichaeldsouza
1
1.2k
Other Decks in Programming
See All in Programming
connect-python: convenient protobuf RPC for Python
anuraaga
0
410
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
2
220
UIデザインに役立つ 2025年の最新CSS / The Latest CSS for UI Design 2025
clockmaker
18
7.4k
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
340
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
150
Integrating WordPress and Symfony
alexandresalome
0
150
俺流レスポンシブコーディング 2025
tak_dcxi
14
8.7k
DSPy Meetup Tokyo #1 - はじめてのDSPy
masahiro_nishimi
1
170
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
310
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
140
SwiftUIで本格音ゲー実装してみた
hypebeans
0
370
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
110
Featured
See All Featured
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.3k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
Scaling GitHub
holman
464
140k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
Building an army of robots
kneath
306
46k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.7k
Producing Creativity
orderedlist
PRO
348
40k
Code Reviewing Like a Champion
maltzj
527
40k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
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!