ES6 Tagged Template Literals

preview_player
Показать описание
Learn how to use ES6 / ES2015 tagged template literals or tagged template strings to compose some rad HTML templates inside your JavaScript code.

Рекомендации по теме
Комментарии
Автор

Welcome back! I am glad that you have started making new videos. Keep up the great work

zzackkkk
Автор

Hey! This was the shortest explanation of template tags that made sense. Thanks!

MrOfffffffffffffffff
Автор

Wow this is so cool, I didn't know about this feature but damn this allows you to do really cool stuff!

jackninja
Автор

So that's how styled comps works nais

idontwhy
Автор

Holly shit, that was the best explanation ever

guerrero_beto
Автор

Hey, thank you for the amazing video!! Which IDE do you use ?

michaelwang
Автор

I used es6 syntax for like 6 months now and i love it.
Yet I have never heard about "Tagged Template Literals".
Anyway, my firend showd me that "string".split`` is a valid call, and I was 99% sure this was a transpiling error.

BlazPecnikCreations
Автор

Oh, first tag function argument is an "array of strings". I didn't catch that.

treenopie
Автор

That's really cool! Could React benefit from that instead of using babel to transpile JSX?

Автор

Neato! You didn't answer your own question ... "why is he using vars even though he uses es6 template strings". I'm curious! :)

Автор

lit-html in a nutshell. Cool! Not sure, who copied who

getdevotional
Автор

And I thought the ` were just a neat way to write variables into your strings. This is a lot more powerful, but I can't come up with an intuitive use case just yet and I feel like I'd revert to writing a function instead. I'll have to keep this one in the back of my mind

ThommyTheThird
Автор

you use Sublime Text? why not Atom?
how you comment all lines at once?

FajnyAleZaNiski
Автор

this seems overcomplicated when I've been doing just this with templating engines for a long time.
I guess if I'm building a templating engine it would be helpful...

whatthefunction