News for hackers. Stuff that matters.
Re:VanJS (Vanilla JavaScript): smallest reactive UI framework by tasubotadas on Thursday May 25, 2023 @05:04AM (#36068491)
Why is everybody so obsessed with size? 100kB means nothing these days.
Re:VanJS (Vanilla JavaScript): smallest reactive UI framework by 130e13a on Thursday May 25, 2023 @05:58AM (#36068795)
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?
Re:VanJS (Vanilla JavaScript): smallest reactive UI framework by ra1231963 on Thursday May 25, 2023 @10:44AM (#36071361)
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 by jhp123 on Thursday May 25, 2023 @12:53PM (#36073098)
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 by ra1231963 on Saturday May 27, 2023 @12:23PM (#36095946)
Proxy objects are absolutely common in js state management frameworks.

And yes it’s nice to build something on your own, but this project is clearly aiming to convince other people to use it in their projects.

Re:VanJS (Vanilla JavaScript): smallest reactive UI framework by pfg_ on Thursday May 25, 2023 @03:58PM (#36075369)
Don't minifiers convert these anyway?

    const a = 1;
    let b = 2;
    console.log(a, b);
bun build --minify a.js // bundles this to:

    var o=1,l=2;console.log(o,l);
It's not even using const or let, it's flattened these multiple statements into one 'var' statement
Re:VanJS (Vanilla JavaScript): smallest reactive UI framework by robertoandred on Thursday May 25, 2023 @05:03PM (#36076204)
Only if you're targeting super old browsers.
Re:VanJS (Vanilla JavaScript): smallest reactive UI framework by zuprau on Thursday May 25, 2023 @06:31AM (#36068994)
Wrong. You know it never ends up being 100kb, and when it reaches 1MB (it always does) then you get the real issues.

It’s because of your thinking that we got bloated webpages.

Re:VanJS (Vanilla JavaScript): smallest reactive UI framework by ilrwbwrkhv on Thursday May 25, 2023 @09:55AM (#36070752)
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 by paulddraper on Thursday May 25, 2023 @01:42PM (#36073717)
They pretend it matters as they download thirty 10MB Tictok videos.