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
170
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
200
入門 React Hooks / Introduction of React Hooks
ygkn
0
200
Other Decks in Programming
See All in Programming
音声プラットフォームのアーキテクチャ変遷から学ぶ、クラウドネイティブなバッチ処理 (20250422_CNDS2025_Batch_Architecture)
thousanda
0
410
VitestのIn-Source Testingが便利
taro28
8
2.4k
Lambda(Python)の リファクタリングが好きなんです
komakichi
5
270
20250426 GDGoC 合同新歓 - GDGoC のススメ
getty708
0
110
MySQL初心者が311個のカラムにNot NULL制約を追加していってALTER TABLEについて学んだ話
hatsu38
2
120
GitHub Copilot for Azureを使い倒したい
ymd65536
1
330
開発者フレンドリーで顧客も満足?Platformの秘密
algoartis
0
210
ComposeでのPicture in Picture
takathemax
0
130
LRパーサーはいいぞ
ydah
7
1.3k
Носок на сок
bo0om
0
1.3k
ComposeでWebアプリを作る技術
tbsten
0
130
Vibe Coding の話をしよう
schroneko
14
3.8k
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
23
2.7k
Making the Leap to Tech Lead
cromwellryan
133
9.3k
Why You Should Never Use an ORM
jnunemaker
PRO
56
9.4k
The Cost Of JavaScript in 2023
addyosmani
49
7.8k
Six Lessons from altMBA
skipperchong
28
3.8k
Mobile First: as difficult as doing things right
swwweet
223
9.6k
[RailsConf 2023] Rails as a piece of cake
palkan
54
5.5k
Being A Developer After 40
akosma
91
590k
How to Think Like a Performance Engineer
csswizardry
23
1.6k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
14
1.5k
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 のライブラリがあるよ!!!
ありがとうございました!