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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
ygkn
June 20, 2019
Programming
230
0
Share
JavaScriptのテンプレートリテラル / Template Literal of JavaScript
ygkn
June 20, 2019
More Decks by ygkn
See All by ygkn
カラースキームつくったよ / How to create color-scheme
ygkn
0
240
入門 React Hooks / Introduction of React Hooks
ygkn
0
220
Other Decks in Programming
See All in Programming
Back to the roots of date
jinroq
0
250
의존성 주입과 모듈화
fornewid
0
150
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
140
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
220
AIエージェントで業務改善してみた
taku271
0
530
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
150
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
270
Liberating Ruby's Parser from Lexer Hacks
ydah
2
1.4k
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
120
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
470
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
420
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
140
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
200
How STYLIGHT went responsive
nonsquared
100
6.1k
Producing Creativity
orderedlist
PRO
348
40k
The browser strikes back
jonoalderson
0
980
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.9k
Heart Work Chapter 1 - Part 1
lfama
PRO
6
35k
The agentic SEO stack - context over prompts
schlessera
0
750
The Mindset for Success: Future Career Progression
greggifford
PRO
0
310
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
120
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
320
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
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 のライブラリがあるよ!!!
ありがとうございました!