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
270
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
280
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
540
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
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
440
Verilogで学ぶCPU自作入門.pdf
uyuki234
8
3.6k
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
390
AHC070解法紹介
eijirou
0
140
SREの越境 / SRE Collaboration
y0hgi
2
290
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
新卒PdEのリアル
ryu1013
1
520
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
430
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
140
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
18
18k
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
380
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
2
300
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Test your architecture with Archunit
thirion
2
2.4k
My Coaching Mixtape
mlcsv
0
330
WENDY [Excerpt]
tessaabrams
14
39k
Embracing the Ebb and Flow
colly
88
5.2k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
250
Done Done
chrislema
187
17k
Agile that works and the tools we love
rasmusluckow
331
22k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
290
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
250
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!