4 ms·
That's stringly typed, right? That sounds like a huge downside to me compared to the not-so-huge downside of JSX. That said, I quite like hyperscript, especial
by Vinnl 9y ago
That's stringly typed, right? That sounds like a huge downside to me compared to the not-so-huge downside of JSX.
That said, I quite like hyperscript, especially in this form: https://github.com/ohanhi/hyperscript-helpers https://github.com/ohanhi/hyperscript-helpers
- josephg 9y agoUgh, that is way harder to read than html`<h1>oh hai ${name}</h1>`. They both work without compilation, and they can both compile to the same code anyway. Maybe you can get used to hyper, but ES6 tagged template literals are much easier on the eyes.
- Vinnl 9y agoMaybe > 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.