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
220
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
230
入門 React Hooks / Introduction of React Hooks
ygkn
0
220
Other Decks in Programming
See All in Programming
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
SourceGeneratorのススメ
htkym
0
200
Package Management Learnings from Homebrew
mikemcquaid
0
220
AtCoder Conference 2025
shindannin
0
1.1k
CSC307 Lecture 09
javiergs
PRO
1
840
高速開発のためのコード整理術
sutetotanuki
1
400
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
300
Patterns of Patterns
denyspoltorak
0
1.4k
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
460
CSC307 Lecture 07
javiergs
PRO
0
550
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Testing 201, or: Great Expectations
jmmastey
46
8k
From π to Pie charts
rasagy
0
120
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Music & Morning Musume
bryan
47
7.1k
The untapped power of vector embeddings
frankvandijk
1
1.6k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
50
Skip the Path - Find Your Career Trail
mkilby
0
56
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
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 のライブラリがあるよ!!!
ありがとうございました!