Trees in the mountains

Why Astro is The Next Big Thing For The Web

It’s a bold statement, I know, but I honestly think Astro is setting itself up to be a really big deal. If you haven’t heard of Astro yet I would highly recommend you pause reading this, go read their landing page, watch Fireship’s Astro in 100 seconds video, then come back here. I’ll wait…

Pretty awesome, right?!

What makes Astro different than other javascript/web frameworks is it doesn’t build sites/web apps on a Javascript foundation. Instead, Astro builds sites on an HTML foundation. You know the foundational language of the web? What has happened in the last few years with meta frameworks like Gatsby, Nuxt, NextJS and their foundational frameworks of React, Vue, and Svelte is that we’ve starting building websites that require massive javascript bundles to even render a single <p> tag for the end user.

I’ll be the first to admit it. I’m not exempt from the JS framework hype myself. For years, I was a fan of Gatsby and the modern dev experience it offers but I always had this feeling like “do I really need to be shipping React for simple websites where the only interactive parts are a few animations and a contact form?” I’ll say what a lot of devs might not want to hear. This is pretty dumb and we need to stop acting like it’s the only way we should be making websites. It’s not necessary for the client to take on this Javascript payload to show them a few header tags, images, some text, and links.

Sure, I understand in order for modern websites to have a great design and some interactivity you’ll have to sprinkle in some javascript but you’re telling me a blog needs to be a full fledged single page app? (SPA) I know this isn’t a new trend and I may already be on the tail end of this argument since frameworks like 11ty are exploding in popularity by embracing the same ideology. Having used 11ty a bit myself though I had this feeling like it’s too far in the opposite direction of modern frameworks. Having to setup a gulp process or webpack config myself for the little javascript I needed felt like such a hassle. Not to mention the awful lack of proper support in VS Code for Nunjucks, the most popular 11ty templating language from my research.

“There isn’t a perfect analogy but it’s almost like we’ve been building the framing for regular old houses out of solid concrete when we should be using plain old 2 x 4’s”

This brings me to Astro. It takes the same HTML-first ideology as Hugo, 11ty, and Jekyll but gives us the modern dev experience that has made Sveltekit, Gatsby, and NextJS so popular. And don’t get me started on the most powerful Astro feature that let’s you ship React, Vue, Svelte, Preact, and Lit components in the same project. That’s for another day. The reason I feel that Astro is on the cusp of something big is becuase web developers are realizing we’re building the house fundamentally wrong.

There isn’t a perfect analogy but it’s almost like we’ve been building the framing for regular old houses out of solid concrete when we should be using plain old 2 x 4’s. The reason I think it’s the next big thing is because Astro does an excellent job of getting out of the way. Let the web platform do what it does best by letting browsers do what they were designed to do, render HTML first, CSS second, and Javascript to fill in the user experience gaps.

Don’t worry, I’m putting my money where my mouth is and from now on and making Astro my default framework and only using something else if I absolutely have to. This site was recently rebuilt with it and in my day job as a frontend developer at an agency I will be pushing to use it for client sites whenever possible.

Still don’t believe me? Try it out for yourself! I made a minimal blog starter repo, they have their own example templates, and there is a growing repo of community starters. What I’ve found I love about it most is I get to write plain old HTML again. That might sound boring but sometimes boring and simple is a breath of fresh air in the world of web frameworks. If you think it’s just hype for a new framework that’s okay but I ask that you please try it before writing your own blog post against it. Test your own Astro project on web.dev and look at your network payload on the static build. For me, the results spoke for themselves.