Live data from Hacker News

VanJS – A no-JSX framework based on vanilla JavaScript

vanjs.org

31–40 of 178 posts

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

#31
post #22

Feels weird to seem to seriously represent your framework as being about size without including a comparison to preact - the obvious choice for a react developer looking to reduce their footprint. Preact claims 3kb on their site, and for a 3-4x savings you're going to need to be fairly compelling. I don't mind paying a modest cost for 10x or 100x improvements, but (call it Stockholm syndrome) I like react syntax

Modern reactive UI frameworks get away from maintaining virtual dom. If you want minimalist vdom preact is a great choice. If you'd like to part ways with vdom while keeping jsx, try svelte or solid-js

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

#32

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 had until very recently a limited data plan for my cell phone in Europe, a plan similar to the one most of my friends have. The only websites that remained reliably accessible once I'd hit the 2Gb limit were HN and i.reddit.com (RIP). 90% of all other websites just time out.

If anything, I wish we could force the marketing team to compress their images better.

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

#33

This is unacceptably huge compared to the similarly named Vanilla JS. http://vanilla-js.com/

> This is unacceptably huge compared to the similarly named Vanilla JS.

It took me a minute to get it.

0 bytes uncompressed, 25 bytes gzipped

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

#34

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?

>Does the amount of written lines of code matter when there's modern linters and tooling?

So long as JavaScript is interpreted it matters a whole lot on mobile devices.

The amount of code delivered and executed on the device has a huge bearing on performance on lower end devices. Unless you're on some $1000+ phone and arguing from a place of privilege.

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

#35
does it mean I have to add many things that are already in vuejs and react if I decide to use vanjs? what vanjs really brings to the table? the existing SPA frameworks are indeed super heavy and anything light and can get daily work done easier will be nice.

after trying react for years I now switched to htmx with a simple backend, until there is a simpler to learn and use SPA(no SSR please) somewhere.

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

#36
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)

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

#38

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.

The framework is fundamental for all the rest of the stuff. You transfer it before the majority of the site's content. The faster it arrives, the faster your site is usable. It's also always in use. A badly sized image can cost a few MB, but that's a trivially addressable problem on one page of your site. The framework being 10x its required size is a huge development hurdle to overcome.

Your local mom-n-pop laundry place's website probably doesn't need these types of efficiencies, but if you're running a large ecommerce site, time-to-interactive is an important metric which can cost a lot of money.

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

#40

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)

It's a little more than that.

Some people feel that XML is great to represent nested structures/trees, and that trying to do that with code is less readable.

Post reply on HN