
Astro for React Devs
Published on Jul 10, 2025
Hey, today I’ll convert you from a React fanboy to an Astronaut.
What is Astro
Astro is a modern web framework built for creating fast, content based, mostly static websites. Though it can handle dynamic magic too. It’s not just another reactive framework like React, Svelte, or Vue.
Astro is different. It’s built on the idea that you dont need all that JavaScript, and that’s a game changer.
Just use HTML?
If all you need is a static landing page, plain HTML is king: maximum performance, full control, zero bloat.
But projects grow. You need reusable components, layout abstractions, and logic. That’s where Astro shines. It gives you the best developer experience of modern frameworks without the cost of client-side overhead.
Remember one of the core principles of programming: DRY — Don’t Repeat Yourself. Vanilla HTML can’t do much here.
Use React or other frameworks?
Frameworks like React, Vue, or Svelte bring powerful abstractions, state, and reactivity—but they also ship a lot of JavaScript to the browser. That JS is useful when you need interactivity. But if you’re just rendering static content, that client-side JS becomes pure overhead.
Astro solves this. You still get components and a modern DX, but only the necessary JavaScript is shipped—and often, that means no JavaScript at all. That’s why Astro apps crush Lighthouse scores and feel instant.
Yes, there are other frameworks that support static sites and SSG—like Hugo or Gatsby. But Astro brings something new.
Why Astro Hits Different
- Most SSGs (Next.js, Gatsby, etc.) still bundle, hydrate components with JavaScript even where you don’t need it.
- Astro has a clean, developer-friendly implementation of islands architecture. You can sprinkle interactivity only where it’s needed.
- File-based routing: Just name your file what you want your route to be, place it in
src/pages/
, and you’re done its that easy.
Astro Components
Astro is framework-agnostic. You can put in components like MyReactComponent.tsx
, MyVueComponent.vue
, Component.svelte
, or even Solid.js with minimal setup Astro handles the interop smoothly.
Astro treats .md
and .mdx
files as first-class citizens.
You can create a simple about.md
inside src/pages/
and instantly get a working /about
route no boilerplate, no config hell.
Let’s look at an Astro component:
Final Thought: It’s Not React vs Astro
It’s about choosing the right tool for the job. Astro isn’t replacing React—it’s removing it from places where it doesn’t belong.
Try it yourself:
pnpm create astro@latest