Hello Astro: The Migration Story
23/11/2025 •
#Astro#Migration#Performance
Hello Astro!
If you’re reading this, it means the migration to Astro was a success! 🚀
Why the switch?
My previous portfolio was built as a Single Page Application (SPA) using React and Vite. While powerful, SPAs can sometimes be overkill for content-focused sites like portfolios and blogs. They often suffer from:
- Larger Bundle Sizes: Shipping the entire React runtime just to render static text.
- SEO Challenges: Search engines sometimes struggle to index dynamic JavaScript content.
- Slower Initial Load: The browser has to download, parse, and execute JavaScript before showing anything meaningful.
Enter Astro
Astro takes a different approach called Islands Architecture.
- Zero JS by Default: Astro renders your pages to static HTML at build time.
- Interactive Islands: You can still use React components (like my particle background or project cards) where you need interactivity, but they are loaded independently.
- Content Collections: Managing blog posts and project data is now type-safe and easy with Markdown and JSON files.
The Result
- Faster Load Times: The site loads almost instantly.
- Better SEO: Google loves static HTML.
- Clean Codebase: No more complex routing logic or state management for simple pages.
I’m excited to continue building on this new foundation!