5 ms·
The king of "use JS frameworks, output pure HTML" is Astro. (https://astro.build/ https://astro.build/) It's basically an SSG where you can use a number of fram
by FireInsight 3y ago
The king of "use JS frameworks, output pure HTML" is Astro. (https://astro.build/ https://astro.build/) It's basically an SSG where you can use a number of frameworks to write your components, and shipping any JS is explicitly opt-in.
- satvikpendem 3y agoAstro is pretty nice too, I was going to write my blog with it but I liked the instant page transitions that NextJS provides out of the box for which I couldn't find a suitable solution in Astro.
- toddmorey 3y agoAstro is adding (optional) client-side routing. I’m excited about that.
- jen729w 3y agoDoesn’t NextJS do that with client-side JS though? I recently moved from Gatsby, which did that — and the transitions sure are instantaneous — to Astro, which outputs plain HTML pages. Each navigation is a request to the server. Yeah, they take a touch longer. But the response is tiny. You could always `preload`?
- satvikpendem 3y agoI tried preload, it doesn't work as well as with NextJS which, yes, uses client side JS. But critically, the pages still work without JS if one so chooses. It's progressive enhancement which Astro does not yet have.
- vegcel 3y agoCould you explain a bit what you do like/don't like about Gatsby compared to Astro?
- satvikpendem 3y agoI used to use Gatsby, but the non standard plugin system as well as forcing GraphQL (I use GQL in my own projects but it's just not necessary for a blog site for example, which Gatsby markets itself as being for) put me off Gatsby and onto NextJS, especially when NextJS introduced their static site rendering features. Now with server components, there doesn't seem to be a real need to use Gatsby anymore.
- jen729w 3y agoGatsby felt like it had grown in to a monster. Astro was a lot simpler which suits my needs and, frankly, skill. I worry that Astro is adding too many features and trying to become Gatsby. No thanks!
- colesantiago 3y agoWhy Astro instead of say, Svelte?
- FireInsight 3y agoAstro is a metaframework that among others can use Svelte for both static and interactive components. Plain Svelte without a metaframework is not suitable for normal websites with multiple pages, but Astro is. As for Astro vs SvelteKit, I generally prefer Astro's approach to filesystem based routing (no +page etc.), I prefer it's MPA approach to the clientside routing SvelteKit and others use OOTB, I like that it's very tailored towards content and being an SSG (content collections, MD and MDX support ootb, currently experimental automatic image optimization), and the "integrations" are a huge time-saver. Some common ones you can add with `astro add`, and many others are just a quick config edit away. I recently built a pretty performant portfolio site with Astro in a single day using DecapCMS and UnoCSS, both as integrations, all the client had to do was accept the invite from Netlify Identity and start adding content to their site!
- password54321 3y agoNo advantage if you just want to use Svelte when SvelteKit does everything Astro does and more while having less dependencies.
- FireInsight 3y agoWell, dependency count is not the metric on which I base my tech decisions on. After all, you could do everything Svelte does with VanillaJS. I just prefer the DX of Astro and MPA routing instead of client-side.