3 ms·
Maybe > 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
by Vinnl 9y ago
Maybe
> 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 :)
- idbehold 9y agoThe "tag" part of a tagged template literal is a function so maybe your editor should be updated to recognize them.