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
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
460
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
210
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
220
Getting started with React 16
arunmichaeldsouza
1
1.3k
Other Decks in Programming
See All in Programming
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
120
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
承認済みなのに差戻しできてしまうバグ、型で潰せます
shinchit
0
130
源内ハンズオン概要編
hideg
0
240
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.2k
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
250
DynamoDBの基礎を振り返りながらベクトル検索機能を理解する
musan
3
260
型解析で実現する Go の言語内 DSL / Conference に Go! タイムテーブルの歩き方 for Gophers
mazrean
0
110
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
300
ハーネス設計入門 〜プロンプト、コンテキストの次〜
kinopeee
53
34k
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
340
Featured
See All Featured
WENDY [Excerpt]
tessaabrams
12
39k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
The SEO identity crisis: Don't let AI make you average
varn
0
550
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
Designing for humans not robots
tammielis
254
26k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
510
エンジニアに許された特別な時間の終わり
watany
108
250k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
310
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!