For comparison, similar tiny JS view libraries - https://redom.js.org 2kB - https://nanojsx.io 1kB
VanJS (Vanilla JavaScript): smallest reactive UI framework
151–160 of 214 posts
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#152Earlier quoted context omitted.
i'm also a bit confused why e.g. they have an explicit rule that they only use `let` instead of `const` when declaring variables, "for reducing the bundle size", which seems like a bad trade-off in order to save maybe a couple dozen bytes at most?
I’m a bit confused why they made it in the first place given the dozens of similar ultra minimal spartan frameworks to choose from that nobody uses (every other comment here is plugging one).
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#153Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#154This is really just a DSL to make dom: https://github.com/vanjs-org/van/blob/3f98060971a8ff141179ef... And a very simple system that replaces the dom from scratch each time any data changes: https://github.com/vanjs-org/van/blob/3f98060971a8ff141179ef... That's bad for performance (recomputing the style/layout and repainting even for minor changes), bad for accessibility, breaks focus, etc. It's unlikely the smaller…
While that's true, I wonder how many websites really benefit from smart diffing algorithms instead of just directly updating the dom.
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#155Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#156Earlier quoted context omitted.
The page will show nothing until the script runs If you know what you are doing you can achieve full state restoration of a large SPA before CSS paints to the screen. In my personal app I am able to complete state restoration within the first 80ms of page load on old hardware. Vue and React are not capable of providing this.
Can you elaborate as if I didn't know what I was doing?
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#157Earlier quoted context omitted.
Saying "I don't want to judge" doesn't mean that I can avoid doing it (unless I avoid writing the thing down completely). There are things that can't be written down without hidden (or obvious) judgement. This is one of those.
Why would you say you don’t want to judge if that’s what you’re going to do anyway?
For example: "I don't want to judge, but I bought a gallon of milk three days ago and didn't get to use a drop of it." My concern isn't that you feel bad about drinking the milk or to paint you as a milk thief to others, my concern is that I bought milk and I didn't get to drink it. I'm being forced to offer a judgement in order to talk about my own experience.
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#158Earlier quoted context omitted.
Why would you say you don’t want to judge if that’s what you’re going to do anyway?
It's been explained well. If you want to point out a fact that paints someone in a bad light, but you are concerned about the fact rather than making people feel bad, you say "I don't want to judge, but [what I say here implies a judgement.]" For example: "I don't want to judge, but I bought a gallon of milk three days ago and didn't get to use a drop of it." My concern isn't that you feel bad about drinking the milk…
What you do is that you just don't say it... that's what you do if you're actually concerned about painting someone in a bad light / don't know if the fact applies at all.
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#159Earlier quoted context omitted.
Yes, please be that guy. Or I'll do it. Vanilla Javascript refers indeed to "javascript without a framework". So creating a framework and calling it "vanilla javascript" is... wrong?
Vanilla.js is the most popular framework in the world!!!! http://vanilla-js.com Also has the smallest footprint: 0 bytes uncompressed, 25 bytes gzipped!
Compression Considered Harmful
Re: VanJS (Vanilla JavaScript): smallest reactive UI framework
#160I really don't want to be that guy, but... Vanilla JavaScript already exists as a popular term for JavaScript without any framework. No jQuery, no React - just JavaScript. Calling a library VanJS (as short for "Vanilla JavaScript") is just going to cause confusion. The repo's own description uses the phrase vanilla JavaScript in this way, and even mixes both meanings within a single sentence. If the author likes the…
We've somehow accepted that nomenclature.