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.
The point was just to showcase my opinion, on how easy it would be to have a basic component-based system with using basically nothing. I am definitely not advocating you do something like this if you need to build something complex. But for adding some interactivity to a small website, I don't see the harm.
Also, I don't believe cross-browser safety is really that much of an issue these days, as it was a few years ago.
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.