Live data from Hacker News

VanJS (Vanilla JavaScript): smallest reactive UI framework

github.com

151–160 of 214 posts

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

#152
post #62

Earlier 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).

This library actually has some pretty unique ideas, like the use of Proxy objects which is not commonplace in javascript frameworks. Even if it didn't, sometimes it's just nice to build your own take on something.

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

#153
post #69

Earlier quoted context omitted.

Wait people write JavaScript without drinking bourbon?

My goto JS drink is Absinthe.

Please create a PR for my library goto-drink.js which uses labels for each libation so you can continue or break your drink.

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

#154

This 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.

The diffing algorithm for preact is super simple, I think it's along the lines of a dozen lines of code. I'd wager the code to directly updating the DOM will be larger than preact + usage code

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

#156

Earlier 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?

https://github.com/prettydiff/wisdom/blob/master/performance...

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

#157
post #141

Earlier 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?

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

#158
post #141

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

>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

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

#159
post #97
post #8

Earlier 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!

> 0 bytes uncompressed, 25 bytes gzipped!

Compression Considered Harmful

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

#160

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…

People are running their code on servers calling it "serverless."

We've somehow accepted that nomenclature.

Post reply on HN