> With vue if you want to make something that's mostly static but with some dynamic flourishes you need to go deep down a rabbit hole of SSR, static site gens, Gridsome, etc. etc. and it can really make your head spin
wait, what? that is not true. if you want a sprinkle of interactivity, you include vue with script tag and write small components over your html & css, jsut like you do with alpine
alpine actually takes the inspiration from vue in terms of this. but is optimised for small file size.
Re:Alpine.js Magic Helpers Library
by qbasic_forever on Sunday February 14, 2021 @04:31PM
(#26136458)
You don't get server-side rendering with a simple vue component though. I.e. when Google's crawler hits your site it just sees a blank html page with a div and nothing more, and your SEO is zero. For a content-heavy site like a blog this is a death sentence of discoverability, and it's why I mentioned you have to go down a deep rabbit hole of extra tech like SSR, static site gens like Gridsome, etc. to resolve it (all with a new set of tradeoffs to consider).
In contrast with alpine, you'd write all your content as plain HTML. Google's crawler sees it and indexes it like any other static content site. Then alpine sprinkles in a bit of interactivity on top for your users. Getting the same behavior with vue (static content with dynamic stuff attached to the DOM later) is non-trivial.
I think from a usage perspective Alpine.js puts you more into a progressive enhancement mindset and focus too. With vue if you want to make something that's mostly static but with some dynamic flourishes you need to go deep down a rabbit hole of SSR, static site gens, Gridsome, etc. etc. and it can really make your head spin. With Alpine.js just write HTML and CSS, then add a bit of interactivity where it's needed--you can be done with an entire project in the time it takes to understand and setup an isomorphic SPA.