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
es6-in-production
Search
pramendra
September 22, 2017
Technology
0
78
es6-in-production
pramendra
September 22, 2017
Tweet
Share
More Decks by pramendra
See All by pramendra
Why not React Native - JP
pramendra
3
1k
Why not React Native - EN
pramendra
0
270
Consulting in 2020
pramendra
0
75
Other Decks in Technology
See All in Technology
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.2k
Devin&Cursor、それぞれの「本質」から導く最適ユースケース戦略
empitsu
8
2.4k
会社員しながら本を書いてきた知見の共有
sat
PRO
3
690
OSMnx Galleryの紹介
mopinfish
0
150
大事なのは、AIの精度だけじゃない!〜1円のズレも許されない経理領域とAI〜
jun_nemoto
11
5.2k
iOS/Androidで無限循環Carousel表現を考えてみる
fumiyasac0921
0
130
データ戦略部門 紹介資料
sansan33
PRO
1
3.1k
コードの考古学 〜労務システムから発掘した成長の糧〜
kenta_smarthr
1
1.2k
GitHub Coding Agent 概要
kkamegawa
1
1.7k
うちの会社の評判は?SNSの投稿分析にAIを使ってみた
doumae
0
160
Cursor Meetup Tokyo
iamshunta
2
370
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
8
65k
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.6k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
460
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Being A Developer After 40
akosma
91
590k
Documentation Writing (for coders)
carmenintech
71
4.8k
Faster Mobile Websites
deanohume
307
31k
Building an army of robots
kneath
306
45k
VelocityConf: Rendering Performance Case Studies
addyosmani
329
24k
Music & Morning Musume
bryan
47
6.6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.6k
How to Think Like a Performance Engineer
csswizardry
23
1.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
19
1.3k
Transcript
ES6 in Production Pramendra Gupta
ES6(ES2015)
const test = ({id, user}) => <h1><span>{id}</span>{user}</ h1>; ES6(ES2015)
const test = ({id, user}) => <h1><span>{id}</span>{user}</h1>; "use strict"; var
test = function test(_ref) { var id = _ref.id, user = _ref.user; return React.createElement( "h1", null, React.createElement( "span", null, id ), user ); }; ES6 ES5
We ship fallback to support legacy browser
Browser Support
Disadvantage of ES5 File Size Parse Time big large Debug
hard
None
<script type="module" />
None
async/await Classes Arrow functions Promises Map Set ES6 modules support
lands in browsers <script type="module" />
Advantage of ES6 version size(min+gzipped) parse time ES5 40k 360ms
ES6+ 20k 170ms File Size Parse Time small low Debug easy
ES6 Rocks
How do we use <!DOCTYPE html> <html> <head> <title>ES6 in
Production</title> <script type="module" src="bundle.js"></script> </head> <body> <div id="app"></div> <script nomodule src="bundle-legacy.js"></script> </body> </html>
Demo https://github.com/pramendra/es6-in-production