Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
React JS Code Splitting - Why and How?
Search
Arun Michael Dsouza
June 30, 2019
Programming
280
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
140
Using the Gamepad API for a better gaming experience on the web
arunmichaeldsouza
0
290
Building your first web app with React JS, Webpack and Babel
arunmichaeldsouza
0
470
React 16 & NPM, Create your own library - React Delhi NCR 07 Oct 2018 Meetup
arunmichaeldsouza
0
230
Houdini, what lies ahead - Web Weekend Kathmandu 2018
arunmichaeldsouza
0
220
Intro to React Components - React Delhi NCR 01 Jul 2018 Meetup
arunmichaeldsouza
1
750
Houdini, what lies ahead - JSConf Iceland 2018
arunmichaeldsouza
0
550
The Era of Module Bundlers - GDG Dev Fest Delhi 2017
arunmichaeldsouza
0
230
Getting started with React 16
arunmichaeldsouza
1
1.3k
Other Decks in Programming
See All in Programming
気持ちぃ〜角丸 Squircle
ryu1013
0
310
R8 の設定見直しでアプリサイズ削減
andpad
0
220
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
610
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
220
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
490
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
270
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.1k
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Practical Orchestrator
shlominoach
192
12k
My Coaching Mixtape
mlcsv
0
360
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
Abbi's Birthday
coloredviolet
4
10k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
270
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
520
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
WCS-LA-2024
lcolladotor
0
890
Paper Plane
katiecoart
PRO
5
54k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
630
The Mindset for Success: Future Career Progression
greggifford
PRO
0
540
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!