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
95
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Code Splitting For JavaScript, within ES2015++
camcam_lemon
February 22, 2018
More Decks by camcam_lemon
See All by camcam_lemon
オレを実装してデザイン実装楽したい
lemon
0
88
要素のサイズを変えずに押しやすくする
lemon
0
100
iOSのキーボード入力ビューをカスタマイズする
lemon
0
330
視え方と文字の大きさ
lemon
1
470
Yarn WorkSpaces × React Nativeの環境構築
lemon
0
340
フロントエンドにおけるアーキテクチャとの向き合い方
lemon
10
5.1k
UI/UXデザイナーがデザインしてるもの
lemon
2
350
react-reduxで追加されたHooks APIの良い所と使い方
lemon
5
1.1k
ESLintで始めるTypeScriptの静的解析
lemon
8
2.2k
Other Decks in Programming
See All in Programming
Building a Meta Ray-Ban display app
akkeylab
0
140
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
210
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
18k
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
560
源内ハンズオン概要編
hideg
0
170
今さら聞けない .NET CLI
htkym
0
190
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.8k
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
470
Foundation Models frameworkで画像分析
ryodeveloper
1
610
仕様駆動開発の消費期限
watany
20
8.2k
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
780
「人を評価する AI」の設計と実装
ryoyanara
0
200
Featured
See All Featured
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
280
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
sira's awesome portfolio website redesign presentation
elsirapls
0
320
How to Ace a Technical Interview
jacobian
281
24k
For a Future-Friendly Web
brad_frost
183
10k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.4k
Writing Fast Ruby
sferik
630
63k
Marketing to machines
jonoalderson
1
5.7k
Thoughts on Productivity
jonyablonski
76
5.3k
What's in a price? How to price your products and services
michaelherold
247
13k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
390
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
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?