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
0
230
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
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
650
[SF Ruby Feb'26] The Silicon Heel
palkan
0
110
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
300
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
100
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
480
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
570
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
400
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
230
Fundamentals of Software Engineering In the Age of AI
therealdanvega
2
260
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
280
AI 開発合宿を通して得た学び
niftycorp
PRO
0
150
Featured
See All Featured
Crafting Experiences
bethany
1
89
Building Applications with DynamoDB
mza
96
7k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
It's Worth the Effort
3n
188
29k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
The Curse of the Amulet
leimatthew05
1
10k
Producing Creativity
orderedlist
PRO
348
40k
Un-Boring Meetings
codingconduct
0
230
Building AI with AI
inesmontani
PRO
1
800
Evolving SEO for Evolving Search Engines
ryanjones
0
160
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 のライブラリがあるよ!!!
ありがとうございました!