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
JavaScriptのテンプレートリテラル / Template Literal of Jav...
Search
ygkn
June 20, 2019
Programming
0
200
JavaScriptのテンプレートリテラル / Template Literal of JavaScript
ygkn
June 20, 2019
Tweet
Share
More Decks by ygkn
See All by ygkn
カラースキームつくったよ / How to create color-scheme
ygkn
0
210
入門 React Hooks / Introduction of React Hooks
ygkn
0
210
Other Decks in Programming
See All in Programming
Introduce Hono CLI
yusukebe
6
3k
PHPに関数型の魂を宿す〜PHP 8.5 で実現する堅牢なコードとは〜 #phpcon_hiroshima / phpcon-hiroshima-2025
shogogg
1
320
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
180
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.3k
CSC305 Lecture 10
javiergs
PRO
0
220
オープンソースソフトウェアへの解像度🔬
utam0k
17
3.1k
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
190
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
270
Google Opalで使える37のライブラリ
mickey_kubo
3
130
CSC509 Lecture 08
javiergs
PRO
0
230
Go言語はstack overflowの夢を見るか?
logica0419
0
510
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
520
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
BBQ
matthewcrist
89
9.8k
Fireside Chat
paigeccino
40
3.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Writing Fast Ruby
sferik
629
62k
YesSQL, Process and Tooling at Scale
rocio
173
15k
Transcript
JavaScript の テンプレートリテラル やぎちゃん
自己紹介
文字をくっつけよう!
文字をくっつけよう!
もじぴったん
None
+演算子のなところ 加算?結合?
+演算子のなところ 加算?結合?
+演算子のなところ 加算?結合?
文字列の結合?
テンプレートリテラルで書く
さっきの
テンプレートリテラルで書く
テンプレートリテラルで書く
One more thing...
None
None
None
None
None
とはならない!
None
これ is 何?
None
これ is 何? タグ付きテンプレート文字列 →テンプレートリテラルで書かれた文字列(の配列)と埋め込まれた変数を受け取る関 数
タグ付きテンプレート文字列の例 (from MDN)
None
None
None
タグ付きテンプレート文字列と @emotion/styled (styled-componentsも可)
Styled Components?
Styled Components?
Styled Components? 一種のHOC
Styled Components?
Styled Components?
まとめ!!! • テンプレートリテラルは文字の連結だけじゃないよ! • 文字列と埋め込む変数を別々に関数に渡すのでいろいろできるよ!! • ↑の例として SQL や CSS
in JS のライブラリがあるよ!!!
ありがとうございました!