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
97
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
420
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.3k
Other Decks in Programming
See All in Programming
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
410
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
270
認証・認可の基本を学ぼう後編
kouyuume
0
250
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
TerraformとStrands AgentsでAmazon Bedrock AgentCoreのSSO認証付きエージェントを量産しよう!
neruneruo
4
1.9k
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
310
Patterns of Patterns
denyspoltorak
0
370
AtCoder Conference 2025
shindannin
0
710
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
190
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
240
Grafana:建立系統全知視角的捷徑
blueswen
0
240
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.3k
Featured
See All Featured
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
190
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
73
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Highjacked: Video Game Concept Design
rkendrick25
PRO
0
250
Music & Morning Musume
bryan
46
7k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
0
320
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Designing for Performance
lara
610
69k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
980
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Navigating Weather and Climate Data
rabernat
0
54
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!