VOOZH about

URL: https://thenewstack.io/astro-revs-up-static-sites-with-partial-hydration/

⇱ Astro Revs Up Static Sites with Partial Hydration - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2022-04-04 06:00:54
Astro Revs Up Static Sites with Partial Hydration
news,
Software Development

Astro Revs Up Static Sites with Partial Hydration

Astro, a new kind of static site builder for the modern web, has introduced server side rendering capabilities and released a v1.0 beta
Apr 4th, 2022 6:00am by Mike Melanson
👁 Featued image for: Astro Revs Up Static Sites with Partial Hydration
Featured image via Pixabay.

Over the last decade, the desire to increase interactivity on the web has led to more and more client-side JavaScript with frameworks like Angular, Vue, and React. While this trend has been a boon for developers looking to create full applications on the web, it has meant more and more JavaScript shipped to the client-side, which can bog down users with older, less powerful devices.

In response, one recent trend has been to try to shift back toward server-side rendering and delivery of content. One approach, taken by tools like Gatsby, Jekyll, and Hugo, is to prebuild websites into static HTML and load them onto content delivery networks spanning the globe, which allows for super-fast load times but reduces the amount of interactivity possible. While those sites have begun introducing functions at the edge to add in more interactivity, they are still limited there.

Enter Astro

Astro, a self-proclaimed “new kind of static site builder for the modern web”, launched nearly a year ago now and is one tool looking to solve this problem with yet another approach, said Astro CEO Fred Schott in an interview with The New Stack.

“It was our attempt to solve some of the problems we saw in the current set of status quo developer tools around too much JavaScript bloat, too high a bar for people who are looking to get into web development, where they almost have to learn React, or Svelte or any JSX language just to get started with building a ‘hello world,'” said Schott. “We really wanted to try to build something that brought web development back to its roots, where it wasn’t just ‘What’s the best JavaScript framework?’ it was ‘What’s the best way to build a site and create HTML, CSS and JavaScript, all equally in that equation?'”

Like many of the responses to JavaScript-heavy frameworks, Astro tries to put the foundational blocks of the web back front and center. Astro does this by employing Markdown which also supports JavaScript expressions and Astro components. Schott explained that Astro is a superset of HTML so anything that works in HTML also works in Astro.

“It feels really familiar to anyone who’s worked with HTML, but you can then sprinkle in JavaScript as you need it and sprinkle in your favorite web framework as you need it,” said Schott. “If all you know is HTML, you should feel really at home with Astro, but at the same time, you can then bring in components from your favorite framework to essentially hydrate on the page as you need them.”

Partial Hydration

There are two basic ideas Schott alludes to here that he says differentiates the framework from others: partial hydration and the ability to work with any framework.

For many frameworks, the page loads as one unit, which means that the user cannot interact with any part of it until everything loads. This also has the bandwidth and compute implications, as it means that a page full of image carousels and other features can take time to load and use up bandwidth.

With Astro, developers can build a site with any front end they like React, Preact, Svelte, Vue, SolidJS, AlpineJS or Lit, for example and all client-side JavaScript is stripped out entirely by default during the build process. Partial hydration, however, allows you to create interactivity by putting back in some client-side JavaScript where it is absolutely needed. At the same time, partial hydration allows the developer to determine what aspects are loaded and when, using something they refer to as an “island architecture”.

“That idea of island architecture and partial hydration is you’re hydrating components in isolation, in parallel separately. The implication there is that, that ‘buy’ button that you need some JavaScript for is going to hydrate way faster in isolation, while an expensive image carousel further down the page is rendering and loading totally separately,” explained Schott. “You can even start to control the loading of individual things. So, the ‘buy’ button, super important, hydrate that instantly, but an image carousel lower down on the page, we don’t really care about that, we’re going to give that the ability to hydrate only once it becomes visible. If you never scroll to it, you never pay the cost of it.”

Currently, Astro provides the benefits of a static site generator with JavaScript “sprinkled in”, but the tool is making some moves beyond that with the introduction of server-side rendering capabilities and the release of a v1.0 beta. Schott said they have been adjusting their direction over the past year of development and looking into server-side rendering for e-commerce use cases. He pointed to a chart of interactivity that was shared on Twitter, noting that “with our announcement next week we’ll be hitting the ‘e-commerce site’ stage of the chart as well, but otherwise we’re not going any further right in terms of our focus.”

TRENDING STORIES
Mike is a freelance writer, editor, and all-around techie wordsmith. Mike has written for publications such as ReadWriteWeb, Venturebeat, and ProgrammableWeb. His first computer was a "portable" suitcase Compaq and he remembers 1200 baud quite clearly.
Read more from Mike Melanson
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.