Migrating from Next.js to Astro
Why I switched from Next.js to Astro and how it made maintaining and updating my site much easier.
For a long time, I used Next.js for my personal site and blog. I’ve always liked working with React, so Next felt like the natural choice.
But over time, I started to notice something: maintaining a static site with Next.js was way more complicated than it needed to be.
Every time I wanted to add a new post or update some information, I had to touch the code, rebuild everything, and wait. Since I don’t use a CMS or database, all my content is static — and in theory, that should be simple… but with Next, it just wasn’t.
Next.js is great, but not for everything
No doubt about it: Next.js is a powerful framework.
If you’re building a complex app, an admin dashboard, or something that needs SSR, API routes, and authentication, it’s amazing.
The issue comes when your project doesn’t need all that.
A simple blog, portfolio, or static site ends up carrying way more weight than it should.
Some things that frustrated me:
- The bundle size was large even for simple pages.
- Adding content required setting up contentlayer or other extra tools.
- Each new post meant changing routes or rebuilding everything.
- The setup felt heavier and heavier over time.
At some point, it feels like you’re using a jackhammer to hang a picture frame.
Then I found Astro
One day, almost by accident, I started experimenting with Astro, and it completely changed my workflow.
The first thing that struck me was how simple it is to build things.
Astro follows a “content-first” philosophy — it’s designed for sites that prioritize content, not apps.
I was able to create a fully functional blog in minutes, without installing any extra dependencies.
No need to set up contentlayer or routing. You just create a Markdown file in src/content, and Astro handles the rest: it generates routes, provides type safety, and even validates metadata automatically.
And the performance is incredible. Astro ships zero JavaScript by default and only loads it when you ask for it, which means blazing-fast pages and super lightweight output.
Still using React (but as an island)
The best part is I didn’t have to abandon React.
Astro lets me use it only when I really need it, as an isolated “island” within the page.
For example, if I need an interactive component or a small visual effect, I can use my usual React components — hooks, props, everything — without affecting the performance of the rest of the site.
I didn’t have to rewrite anything in plain TypeScript or change how I think about components.
Astro just gives me the freedom to choose when and where to use React.
Comparing the experience
| Aspect | Next.js | Astro |
|---|---|---|
| Bundle size | Large, even for simple sites | Minimal by default |
| Content management | Needs contentlayer or external tools | Built-in content collections |
| Learning curve | Steeper for static sites | Very low |
| Performance | Good, but heavier with JS | Excellent, 0 JS by default |
| React | Fully dependent | Optional, as needed |
My current workflow
These days, writing a new blog post is literally just creating a Markdown file.
Astro takes care of everything else — routing, layouts, type checking, and rendering.
I use TailwindCSS for styling and React for interactive components (like menus or hover effects).
Everything else is static, clean, and fast.
I no longer worry about bundle size or unnecessary dependencies.
I just write and publish.
Conclusion
Migrating to Astro made my life a lot easier.
Now, whenever I want to add new information or update something, I can do it effortlessly — no extra tools, no complex setup.
With Next, even changing something small like a piece of text or a section felt like too many steps.
With Astro, everything is more direct: open a file, change it, done.
It wasn’t just a change in technology, but a change in workflow.
Maintaining my site is now faster, lighter, and much more practical.