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
250
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
110
Using the Gamepad API for a better gaming experience on the web
arunmichaeldsouza
0
260
Building your first web app with React JS, Webpack and Babel
arunmichaeldsouza
0
430
React 16 & NPM, Create your own library - React Delhi NCR 07 Oct 2018 Meetup
arunmichaeldsouza
0
210
Houdini, what lies ahead - Web Weekend Kathmandu 2018
arunmichaeldsouza
0
190
Intro to React Components - React Delhi NCR 01 Jul 2018 Meetup
arunmichaeldsouza
1
730
Houdini, what lies ahead - JSConf Iceland 2018
arunmichaeldsouza
0
510
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
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
240
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.1k
Codex の「自走力」を高める
yorifuji
0
1.3k
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
260
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
180
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
1.1k
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
270
Claude Codeログ基盤の構築
giginet
PRO
7
3.7k
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
1.6k
How to stabilize UI tests using XCTest
akkeylab
0
150
Java 21/25 Virtual Threads 소개
debop
0
300
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
210
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Designing for humans not robots
tammielis
254
26k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
350
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
150
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
120
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Evolving SEO for Evolving Search Engines
ryanjones
0
170
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
190
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
490
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
890
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!