Live data from Hacker News

Ask HN: Best tiny JavaScript framework?

news.ycombinator.com

1–10 of 46 posts

Ask HN: Best tiny JavaScript framework?

#1
I'm deciding on a Javascript framework to use in building a real time chat application with a tiny footprint. I can't use React, Angular, Ember, or Vue because they are too large. I would build the app in vanilla Javascript, but I fear that it will become more and more difficult to maintain and I will end up reimplementing many already solved problems.

Some of the frameworks that I've seen that are small, fast, and well-liked are Preact, Inferno, Mithril, and Ractive. Does anyone have any experience with these, or even better, thoughts on a comparison between them?

Re: Ask HN: Best tiny JavaScript framework?

#5

Is there a maximum file size that you're looking for? Because Vue.js is pretty small, 23K after gzip: https://gist.github.com/Restuta/cda69e50a853aa64912d

I love Vue and have used it before, but I would like to use an even smaller library if possible. I believe Inferno is 9kb and Preact is 3kb, so Vue isn't that far off, but I still would like to hear people's opinions on the truly tiny frameworks.

Re: Ask HN: Best tiny JavaScript framework?

#6

There are two that I know of that are truly tiny: Monkberry[0] and RE:DOM[1] which are respectively 1kb and 2kb in size. [0]: http://monkberry.js.org/ [1]: https://redom.js.org/

Wow, these are very interesting libraries. I hadn't heard of either before today but they both look similar to what I am trying to find. Have you used either of them? I wonder if anyone uses them in production.

Re: Ask HN: Best tiny JavaScript framework?

#8

Why do you need such a tiny footprint?

I need a footprint that works well with mobile devices, slow internet connections, etc. Also, I prefer smaller frameworks as they have less cognitive load - I usually am more able to read the source code, understand the API, and so on.

Re: Ask HN: Best tiny JavaScript framework?

#10

Is there a maximum file size that you're looking for? Because Vue.js is pretty small, 23K after gzip: https://gist.github.com/Restuta/cda69e50a853aa64912d

I love Vue and have used it before, but I would like to use an even smaller library if possible. I believe Inferno is 9kb and Preact is 3kb, so Vue isn't that far off, but I still would like to hear people's opinions on the truly tiny frameworks.

Preact's size for the amount of functionality and performance you get is unbeatable, I'd say.

If you do find something smaller, the amount of glue or performance related code you add will probably end up being more than Preact.

Post reply on HN