Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You wouldn’t use Astro with NextJS, but you absolutely would with react.

Astro is an SSR more tuned to generate static sites than SSR with hydration. It uses the islands architecture instead of full page re-hydration. So if you’re generating a static site with a few react components sprinkled in, it’s a good thing to use.

Because of the islands architecture, you can also mix and match component libraries. So one component can be react, one can be vue, one can be svelte, etc.

Next and remix are both less focused on SSG than Astro. A lot of people are making very content driven sites using react or Next—sites that aren’t really or shouldn’t be SPAs—and this is a great tool for content driven sites that don’t benefit from SPA-level interactivity (which is probably most sites using SPA frameworks)



How are Next and Remix less focused on SSR, I thought that was one of their main selling points? As well as static site generation. For example I use Next for a blog site that is SSG, works fine.

The islands architecture is interesting but in practice I doubt I'd swap between multiple component libraries.


Astro SSG and Next SSG have vastly different outputs. Astro's image component output is a prime example compared to Next with Astro being much, much cleaner. Astro's output in general is much cleaner, more streamlined, and less JavaScript heavy.

With the island architecture, it's not that you would switch between different architectures, but that you can choose which component framework you want to use on top of the same templating framework. Of course, you can mix and match, but that's not really the point.


If you haven't checked out Next.js in awhile, the next/image output changed recently. It's just an img tag now, basically setting srcSet automatically on easy mode, plus the automatic optimization of images. Most of the props or modifications you can use are native <img> features. It's similar to Astro (which is great!).


Next JS hydrates the entire page as a react component, so it's SSR on initial site visit and then navigating from there requires rendering (and maybe you'll use SSR to get some props).

Astro is actually an MPA that allows some client side components, so it only requires you to render on parts of the page. I prefer that for content heavy sites because I'm not sure how much interactivity I need.


This is Next.js in the "Pages Router" world (e.g. everything prior to 13.4). Past 13.4, you can also use the "App Router", which is kind of like a framework in a framework. It uses React Server Components, which can run server-only without hydration. Thematically similar to islands.


Yes, these are pretty new though and I hear some people are having issues with the app router. Astro came before this release


Remix is entirely SSR, so not sure what they meant. Next.js is static first, but definitely still supports dynamic. It started out as a dynamic, SSR framework.


Sorry, there was a typo. Astro is more focused on SSG than SSR. This is what happens when trying to comment on a phone keyboard first thing in the morning.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: