Re:VanJS: A 0.9KB JavaScript UI framework
by earthboundkid on Wednesday December 20, 2023 @04:59PM
(#38714208)
Sure, I think that's a very real consideration, but if you're not a daily JS developer, I'm not sure why you'd use a function-call syntax to build up a template either. Something like Alpine.js where you just mark up your server side HTML is a lot easier than putting a bunch of logic into JS to build up a template. Or you could use lit-html or a million other things. This is an idea that's been done a million times but never catches on because it's not better than the alternatives.
[ Parent
| on HN ]
Re:VanJS: A 0.9KB JavaScript UI framework
by ping-monkey on Wednesday December 20, 2023 @05:47PM
(#38714689)
FWIW, for HTML template:
1. How easy is it to support loops? 2. How easy is it to compose (defining small components that can be used in larger components)? 3. How easy is it to make the UI reactive to client-side state changes?
> because it's not better than the alternatives
What is the alternative you're refering?