Back to progressive enhancement with Astro
I recently found myself with some free time on my hands, so I decided to rewrite my website using Astro (it was previously built using Hugo). Why did I choose Astro?
Next.js is probably the best-known web framework that has taken steps towards this — and with Next.js 13 and the introduction of the
app directory and support for suspense and streaming it now has all of the fundamental pieces in place.
Another good option (and the one I chose) is Astro. Astro is aimed at static sites (although it does support server side rendering) with some interactivity, and is more of a meta-framework: you can use React, Vue or plain old HTML to build your pages (and mix and match between them).
While the building blocks for creating progressively enhanced sites with a great DevEx have largely been realised, there is still work to do to improve the experience further to make it simpler and more fun.
Astro Reactive is a library for Astro that provides this with its
Form component, but it would be nice to see the frameworks introducing better support for this themselves.
As for why I chose Astro over Next.js — my website does not need server-side rendering (which Next.js excels at), client-side routing (which Astro does not currently support) and Astro lets me write reusable components in plain HTML, utilizing React only when necessary.