Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I’d like to use a simple front end library that doesn’t use a vdom, doesn’t require a special state system, doesn’t require special compilation, is performant, and largely gets out of my way.

I currently use Preact and am pretty happy with it, even though it doesn’t check most of those boxes. Is there something that does?

Anyway, Mithril looks nice. I’ve kicked the tires a few times, but comments like the ones here in this thread have prevented me from adopting it.



There's Svelte, that matches most of your requirements, but unfortunately does require a compilation step.

Since I'm a backend dev, I've been looking for a straight-forward library to use for my next project and found this. I haven't yet used it on a project though

https://svelte.dev/


Svelte with Snowpack does compilation in milliseconds.


How long does compilation typically take?


"Alpine.js offers you the reactive and declarative nature of big frameworks like Vue or React at a much lower cost. You get to keep your DOM, and sprinkle in behavior as you see fit... Alpine doesn't use a virtual DOM. This implementation allows Alpine to stay rugged and use the real DOM to work its magic" https://github.com/alpinejs/alpine


I’ve seen Alpine, and it is interesting, but another bullet point in my wish list is vanilla JS; no new template language. JSX is just a small bit of sugar on top of vanilla JS, in my mind, so it is acceptable.


From the brief glance I've taken at Alpine I didn't think it did have a template language - unless you refer to it's use of custom html attributes?


Alpine has directives like x-if and x-for. For a lightweight templating library I would recommend https://pure-js.com. It's been around for ages. The PureJS directives take some time to get used to, but are quite powerful once you do.


LitElement checks all those boxes: https://lit-element.polymer-project.org/


The “special compilation” step is what annoys me as well. Modern JavaScript is powerful enough and almost universally supported enough to no longer need this. I’m looking forward to the day when we don’t have to use transpiled languages and preprocessrs for basic things.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: