r/javascript • • Sep 23 '19

You might not need a framework

https://medium.com/@pljeskavicica/you-might-not-need-a-framework-79444bda50d2
70 Upvotes

129 comments sorted by

View all comments

80

u/phpdevster Sep 23 '19

This seems like a fairly organized, but still jQuery-like approach without the cross-browser safety of jQuery. You're still doing manual DOM querying and state manipulating instead of something more declarative.

Gzipped and minified, Vue is just 20kb. It's so light weight that there's almost no reason not to use it for adding ad-hoc rich interactivity on a given page.

37

u/libertarianets Sep 23 '19

Might I introduce you to Preact?

8

u/dwighthouse Sep 23 '19

Might I introduce you to hyperHTML?

No VDOM. Extremely fast. Requires no transpilation. 5KB.

5

u/grimr5 Sep 23 '19

Or lit-html and lit-element

3

u/dwighthouse Sep 23 '19

I prefer the original, but they do seem to be pretty fast.

1

u/grimr5 Sep 23 '19

At my work, we are moving from polymer to lit, and lit is really nice by comparison. If I were starting something new, I’d look closer at hyperhtml as it has a lot of cool things not in lit (although I’m guessing viper is for SSR and PRPL could mitigate that for either library) - or lighterhtml could also be worth a look as that looks closer to what lit is.

1

u/IceSentry Sep 24 '19

Isn't lithtml supposed to be a templating library used with polymer?

1

u/grimr5 Sep 24 '19

It is, but lit-element is a replacement at the component level, ie no polymer