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
Code Splitting For JavaScript, within ES2015++
Search
camcam_lemon
February 22, 2018
Programming
0
86
Code Splitting For JavaScript, within ES2015++
camcam_lemon
February 22, 2018
Tweet
Share
More Decks by camcam_lemon
See All by camcam_lemon
オレを実装してデザイン実装楽したい
lemon
0
57
要素のサイズを変えずに押しやすくする
lemon
0
75
iOSのキーボード入力ビューをカスタマイズする
lemon
0
260
視え方と文字の大きさ
lemon
1
410
Yarn WorkSpaces × React Nativeの環境構築
lemon
0
290
フロントエンドにおけるアーキテクチャとの向き合い方
lemon
10
5k
UI/UXデザイナーがデザインしてるもの
lemon
2
320
react-reduxで追加されたHooks APIの良い所と使い方
lemon
5
1k
ESLintで始めるTypeScriptの静的解析
lemon
8
2.1k
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
390
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
210
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
32k
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
110
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
120
Claude Agent SDK を使ってみよう
hyshu
0
1.1k
あなたとKaigi on Rails / Kaigi on Rails + You
shimoju
0
170
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
500
Introduce Hono CLI
yusukebe
6
2.6k
Catch Up: Go Style Guide Update
andpad
0
230
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
210
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
340
Featured
See All Featured
Unsuck your backbone
ammeep
671
58k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Gamification - CAS2011
davidbonilla
81
5.5k
Building Applications with DynamoDB
mza
96
6.7k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
Designing Experiences People Love
moore
142
24k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Code Review Best Practice
trishagee
72
19k
YesSQL, Process and Tooling at Scale
rocio
173
14k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
190
55k
How GitHub (no longer) Works
holman
315
140k
Transcript
Code splitting For JavaScript, within ES2015++
introduction library:React/Redux tools:Babel, webpack, gulp, ESLint, Lerna test:mocha, nyc, power-assert,
enzyme, sinon, testdouble.js
None
None
varは死罪 functionは大罪
“ 変数はconst, letで宣言 関数は => で記述
Contents ➢ 変数宣言 ➢ アロー関数 ➢ テンプレートリテラル ➢ スプレッド演算子 ➢
反復処理 ➢ 分割代入 ➢ モジュール ➢ クラス ➢ 非同期処理 ➢ ...other Proposal ES2015++ ➢ iterator/generator
Contents ➢ カリー化関数 ➢ オブジェクト操作 ➢ 配列操作 Co din g
app ro ach
変数宣言 const 再代入不可 let 再代入可能
None
letで宣言するべき...?
アロー関数 1. thisがレキシカルに決まる a. 宣言した箇所でthisが束縛される b. var that = this;
の呪縛から開放される!! c. call(), apply() メソッドは不要!! 2. 書き方が何パターンかある =>
None
None
None
None
テンプレートリテラル ``
スプレッド演算子 ...
分割代入 1. 必要なものだけ取り出せる 2. 別名で取り出すこともできる 3. やりすぎると可読性下げちゃうかも...
None
None
反復処理 for-of 1. 反復可能なオブジェクトに対して使える 2. airbnb社は非推奨の制御構文に指定している a. iterator / generator
変換が重い b. ベストプラクティスが他にある 3. async IteratorがES2018から実装される予定 かなり難しめ...
None
None
モジュール 1. JavaScriptファイルのimport/exportが可能に 2. 変数の巻き上げやグローバル汚染は起きない 3. node.jsのrequireとはちょっと違う
ex t im t re e ex t
None
None
クラス 1. 他言語と同じようにクラス定義できる 2. ただし、prototypeベースのクラス継承 3. モジュールのように使うことが多い
Fish . prototype . call = function () { count++;
return this.name; }
goldFish. . prototype = Object . create( Fish . protorype
);
非同期処理 1. コールバック地獄とはおさらば 2. Promise なんてもう古い!! 3. 時代は async/await だ!!
None
None
None
other ➢ コレクション ➢ 文字列パディング ➢ Symbol ➢ Array.isArray, Array.includes
➢ Object.values, Object.entries, Object.assign ➢ Object.getOwnPropertyDescriptors
iterator 1. 反復可能(イテラブル)なオブジェクトを取り出すオ ブジェクト 2. next()を必ず持ち、実行するとイテレータリザルト を返す 3. イテレータリザルトは必ず以下のキーを持つ a.
value(取得値) b. done(全取得完了かを示す真偽値)
None
generator 1. iteratorを関数ベースで実行する 2. 処理を途中で止めることができる(同期的に実行 することができる) 3. generatorが停止している間、他の処理をブロッキ ングしたりはしない
None
None
Thanks! Any questions?