Live data from Hacker News

VanJS (Vanilla JavaScript): smallest reactive UI framework

github.com

121–130 of 214 posts

Re: VanJS (Vanilla JavaScript): smallest reactive UI framework

#121
post #14

The "Hello World" example is a really good example of why React, Vue, etc are better than something more minimal like this library if you're optimizing for speed. The page will show nothing until the script runs, which requires downloading the VanJS lib and the script itself. You could inline them into the page, but that gets seriously messy at scale. A modern React app that's using some serverside rendering for the…

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.

Re: VanJS (Vanilla JavaScript): smallest reactive UI framework

#122

I 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…

I love your suggestion and slogan.

Re: VanJS (Vanilla JavaScript): smallest reactive UI framework

#123
post #33

Web development is going to come full circle once everyone comes to terms with the fact that web development has been overcomplicated and you don't need 1000 packages and abstractions on top of abstractions just to interact with some DOM elements.

But that's only because the frameworks guided the direction of the specifications. You couldn't use vanilla in this way 10 years ago.

Re: VanJS (Vanilla JavaScript): smallest reactive UI framework

#124
post #95

Earlier quoted context omitted.

> Seems pretty vanilla No it doesn't, same as "automobile" doesn't seem pretty Saturn-5, despite the fact that both are moving under their own power. Terms have meaning, including meaning derived from communities by and large accepting that a certain term has a certain semantic meaning. And the accepted semantic meaning of "Vanilla Javascript" is "runs without a framework besides the browsers own API". If my code wor…

So loading an external library or framework isn't Vanilla JS, but if I copy/paste the VanJS source into a script tag, nothing gets loaded, there's no syntax magic, just some function calls, so that's Vanilla JS, right? If the latter isn't Vanilla JS by your definition, can I at least copy/paste something from stackoverflow? Trying to make Vanilla JS a strict definition seems pointless to me in the first place.

When you do it this way isn't even a framework is just a helper library (at his best). There is another concept for this kind of micro-libraries but calling "framework" to something that will not establish a frame of work for you.

Re: VanJS (Vanilla JavaScript): smallest reactive UI framework

#125

Earlier quoted context omitted.

Don't run chrome on the server for SSR, I beg you. That's a massive performance hit and scales terribly with all the memory usage.

In this case, you can do it on your CI as part of the deployment, so it's not that bad.

Sure that's doable if the site is static only. I was going off the SSR terminology which usually means the html is rendered at the time of request instead of built one ahead of time (SSG)

Re: VanJS (Vanilla JavaScript): smallest reactive UI framework

#126

Why is everybody so obsessed with size? 100kB means nothing these days.

Because of people like you we will have the collapse of civilization, global warming and apps like Slack.

Not caring about memory usage, data usage, speed is the reason why software is so brittle and broken these days.

Re: VanJS (Vanilla JavaScript): smallest reactive UI framework

#127

That's cool but my favorite vanilla js framework by far is vapor.js. https://github.com/madrobby/vapor.js

The website for this is top-notch. It always turns me off when frameworks have bad websites, thankfully this amazing project doesn't. http://vaporjs.com/

https://web.archive.org/web/20120322223910/http://vaporjs.co...

Re: VanJS (Vanilla JavaScript): smallest reactive UI framework

#128
I like this, but https://github.com/vanjs-org/van#ultra-lightweight should really list svelte, which is only 1.6-1.8kB compiled last I checked (though it's possible it makes some of the compiled markup that gets shipped larger than the source due to component style scoping)

Re: VanJS (Vanilla JavaScript): smallest reactive UI framework

#130
post #62

Why is everybody so obsessed with size? 100kB means nothing these days.

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).
Post reply on HN