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
190
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
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
930
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
680
Rails Frontend Evolution: It Was a Setup All Along
skryukov
0
270
ISUCON研修おかわり会 講義スライド
arfes0e2b3c
1
460
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
730
[SRE NEXT] 複雑なシステムにおけるUser Journey SLOの導入
yakenji
0
130
生成AI時代のコンポーネントライブラリの作り方
touyou
1
280
Flutterで備える!Accessibility Nutrition Labels完全ガイド
yuukiw00w
0
170
NPOでのDevinの活用
codeforeveryone
0
890
効率的な開発手段として VRTを活用する
ishkawa
0
160
状態遷移図を書こう / Sequence Chart vs State Diagram
orgachem
PRO
2
200
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
330
Featured
See All Featured
Being A Developer After 40
akosma
90
590k
Optimizing for Happiness
mojombo
379
70k
The Language of Interfaces
destraynor
158
25k
KATA
mclloyd
30
14k
Building an army of robots
kneath
306
45k
Statistics for Hackers
jakevdp
799
220k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Scaling GitHub
holman
460
140k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
340
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
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 のライブラリがあるよ!!!
ありがとうございました!