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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Arun Michael Dsouza
June 30, 2019
Programming
260
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
130
Using the Gamepad API for a better gaming experience on the web
arunmichaeldsouza
0
280
Building your first web app with React JS, Webpack and Babel
arunmichaeldsouza
0
450
React 16 & NPM, Create your own library - React Delhi NCR 07 Oct 2018 Meetup
arunmichaeldsouza
0
220
Houdini, what lies ahead - Web Weekend Kathmandu 2018
arunmichaeldsouza
0
210
Intro to React Components - React Delhi NCR 01 Jul 2018 Meetup
arunmichaeldsouza
1
740
Houdini, what lies ahead - JSConf Iceland 2018
arunmichaeldsouza
0
530
The Era of Module Bundlers - GDG Dev Fest Delhi 2017
arunmichaeldsouza
0
220
Getting started with React 16
arunmichaeldsouza
1
1.3k
Other Decks in Programming
See All in Programming
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
What's New in Android 2026
veronikapj
0
210
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1.7k
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
0
450
[RVD26] Vibe Architecture en 2040 : Darwin a-t-il (enfin) eu raison des architectes ?
alexandretouret
0
100
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.6k
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
280
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
450
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
490
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
0
180
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
150
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
400
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
180
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Context Engineering - Making Every Token Count
addyosmani
9
1k
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
570
RailsConf 2023
tenderlove
30
1.5k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
520
Large-scale JavaScript Application Architecture
addyosmani
515
110k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
390
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.4k
The Curse of the Amulet
leimatthew05
2
13k
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!