Re:V8, Advanced JavaScript, and the Next Performance Frontie...
by idbehold on Tuesday May 30, 2017 @11:46AM
(#14446126)
The "tag" part of a tagged template literal is a function so maybe your editor should be updated to recognize them.
Re:V8, Advanced JavaScript, and the Next Performance Frontie...
by qudat on Tuesday May 30, 2017 @03:20PM
(#14447748)
html`<h1>oh hai ${name}` won't get any complaints from any linters by default, while h('h1', `oh hai ${name}` would throw an error.
> h1(`oh hai ${name}`)
is harder to read than
> html`<h1>oh hai ${name}</h1>`
for some people, but even then your editor can understand that that is a function, can tell you when you've mistyped it, can autocomplete it for you, and can give you hints on what arguments it takes (since it has TypeScript definitions).
And as a bonus for me, I also find the former easier to read than the latter, but that might just be getting used to it :)