Live data from Hacker News

VanJS – A no-JSX framework based on vanilla JavaScript

vanjs.org

51–60 of 178 posts

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#51

People complaining about lack of JSX, HTML angle-brackets: I don't get it. XML gets all the hate for being overly verbose (and for good reason [1]) however with HTML syntax, which is almost the same, everybody seems to be just fine... [1] XML is sooo nineties, the "modern" developer uses markdown. inb4 S-Expressions (...yes I know)

Agreed. JSX is a bug, not a feature.

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#52

The whole “small footprint” thing is always weird to me. I understand that lots of people really want to squeeze efficiency out of every single kb but Im struggling to see where this is helpful. A single image, a single pixel from the marketing team, the actual application code, the page, etc are all going to dwarf the framework.

I worked at a startup where we reduced the app size by moving to preact from react. The thinking was that it would be beneficial for the low powered mobile users but what we actually saw was increased retention and engagement from all segments as the app was a lot more snappier and didnt chug on every click/tap

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#53

People complaining about lack of JSX, HTML angle-brackets: I don't get it. XML gets all the hate for being overly verbose (and for good reason [1]) however with HTML syntax, which is almost the same, everybody seems to be just fine... [1] XML is sooo nineties, the "modern" developer uses markdown. inb4 S-Expressions (...yes I know)

Agreed. JSX is a bug, not a feature.

... and imposes a build step, for no good reason.

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#56

Earlier quoted context omitted.

More like:

Please no The {...} syntax is a non-standard extension to XML/HTML I think MS came first up with back in the day for XAML (WPF). It's a hack to "fix" a shortcoming of the base language. It does not compose, i.e. : } /> does not work.

That would be

Still more readable than brackets hell like:

DoStuff(DoMoreStuff(DoEvenMoreStuff()))

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#57

Earlier quoted context omitted.

Please no The {...} syntax is a non-standard extension to XML/HTML I think MS came first up with back in the day for XAML (WPF). It's a hack to "fix" a shortcoming of the base language. It does not compose, i.e. : } /> does not work.

That would be Still more readable than brackets hell like: DoStuff(DoMoreStuff(DoEvenMoreStuff()))

^^^ Apples to oranges:

       
vs

    DoStuff(DoMoreStuff(DoEvenMoreStuff()))
Both of them you would split into indented lines when they become too long. And 1 becomes too long much faster.

Also with 2 you can do

    const todo = DoMoreStuff(DoEvenMoreStuff());  
    DoStuff(todo);
where as with 1 you cannot.

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#59
A lot of the heft of React comes from its optimization and reconciliation code. Looking at the examples on the homepage, I’m struggling to see how this framework would efficiently make updates. It seems like it would just need to update the entire component tree down on any update. For any sufficiently large app this becomes very slow very quickly.

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#60

Why do people even reinvent this wheel every few months? Does the Anyone can build a "reactive" type framework by following tutorials online now, they're super in vogue. Is my cynicism here warranted, or am I just jaded from 20 years of watching pendulums swing left and right and watching the wheel be reinvented over and over?

Size does still matter. Just because we _can_ serve huge amounts of data over the pipe quickly doesn't mean we _should_.

Except... the huge amount is photos and fonts and whatnot. As you can see on the vanjs size, the biggest framework Angular weights 85 kB and it will be cached. Compared to what Angular also brings in functionality, i don't see size of the framework as an argument anymore.

Consider Hackernews: hn.js comes with 21,4 kB. The Y logo on the upper left is a 46,32 kB SVG!

What should i care about 1kB minimal framework or 85kB all-included framework? Skillset, maintenance burden, compatibility matter.

Post reply on HN