3 ms·
Lots of comments confused about what Astro does, and apparently their homepage is not the best testament to its performance, so let me explain. (No affiliation,
by jakelazaroff 3y ago
Lots of comments confused about what Astro does, and apparently their homepage is not the best testament to its performance, so let me explain. (No affiliation, but I’ve used Astro and I really like it.)
Astro is a JavaScript framework for building content-heavy websites, like blogs and e-commerce stores. It can be used as a static site generator or rendering pages dynamically on the server, or a mix of both. You can use it with any JS framework — React, Svelte, etc — or none at all.
By default, there is no client-side JS.
- cuu508 3y agoThanks. There are many static site generators around. Is there something that makes Astro special or different? What is its unique selling point?
- threatofrain 3y agoAstro also does SSR. I'd say that Astro is special in the ecosystem because (1) they went all-in on MPA and (2) they support many component frameworks.
- mplewis 3y agoAstro is really good at rendering JS on the server out of the box, while letting you quickly fall back to dynamic content as needed.
- steveklabnik 3y agoI chose Astro for my personal website because these things all aligned with my thinking in this space and desires for a tool: https://docs.astro.build/en/concepts/why-astro/ https://docs.astro.build/en/concepts/why-astro/
- _puk 3y agoA big thing is support for island architecture [0]. Essentially it only pulls in the JavaScript it needs to make an element interactive; you can mix frameworks on the same page, and it's very fast. https://docs.astro.build/en/concepts/islands/ https://docs.astro.build/en/concepts/islands/
- magic_hamster 3y agoIn other words, it's a back end framework in JS.
- jakelazaroff 3y agoNot really. I use it as a static site generator. You also can have it generate client-side JS. Look at what the sibling commenters are saying about island architecture.
- todotask 3y agoI see it as an "hybrid or un-opinionated web framework" because it doesn't force you to adopt certain patterns, Islands Architecture is the sauce for UI components where they are solving in a way I see that jQuery, React, Bootstrap, Tailwind as a tool for solving complexity in our projects. We get first-class speed and assets optimizers for free!
- landgenoot 3y ago> By default, there is no client-side JS. Just like in the PHP 5 days