How i build my portfolio website using Astro + React islands
Web Development next-js

How i build my portfolio website using Astro + React islands

Built a high-performance portfolio using Astro and React Islands, combining static speed with selective, meaningful interactivity.

28 June 2023 12 min

When I decided to rebuild my portfolio website, I had one clear goal: performance without sacrificing interactivity. I didn’t want a heavy JavaScript bundle loading on every page just to animate a few buttons or open a menu. At the same time, I didn’t want a completely static site that felt lifeless.

That’s when I discovered Astro with React Islands, and it completely changed how I think about frontend architecture.

In this post, I’ll walk you through why I chose Astro, how React Islands work, and how I structured and built my portfolio website step by step.

Why I Didn’t Use a Traditional SPA

My earlier portfolio versions were built with classic React or Next.js setups. They worked, but they had problems:

A portfolio website doesn’t need constant client-side reactivity. Most of the content is static: text, images, project descriptions. Only specific components actually need JavaScript—like theme toggles, animations, or interactive sections.

That’s where Astro shines.

What Makes Astro Different

Astro follows a content-first approach. By default, Astro ships zero JavaScript to the browser. Pages are rendered as static HTML, which makes them incredibly fast.

But here’s the magic:Astro allows you to add framework components (React, Vue, Svelte, etc.) only where needed.

This concept is called Islands Architecture.

Instead of hydrating the entire page, you hydrate small interactive islands. Everything else stays static.

For a portfolio website, this is basically perfect.

Understanding React Islands

In Astro, a React component becomes an island when you add a hydration directive like:

This means:

So my navbar, animations, and interactive cards use React, but my blog pages and content sections stay static.

Best of both worlds.


Folder Structure

Image: A visual breakdown of Astro’s intuitive project structure, showcasing how file-based routing and the explicit separation of components, layouts, and pages contribute to a cleaner, more organized developer experience.


My Project Structure

I kept my structure clean and intentional:

Astro handled routing, layouts, and SEO beautifully. I didn’t need complex configs or plugins—everything felt simple and predictable.

Building the Hero and Layouts

The hero section of my portfolio is completely static. It’s just HTML and CSS rendered by Astro, which means:

I used Astro layouts to keep things DRY—header, footer, and metadata are shared across pages. This made the site easier to scale when I added more sections like projects and blogs.

The typography and spacing were carefully chosen to feel modern but readable. Since Astro outputs clean HTML, Lighthouse scores were already excellent without optimization hacks.

Where React Comes In

I used React only where it made sense:

Each of these is a React Island, hydrated only when needed.

For example:

This kept JavaScript usage minimal while preserving a dynamic feel.


Hydration Error

Image: A futuristic developer workspace in 2026, featuring a multi-monitor setup and AR glasses. The screens display a Dockerfile in a code editor, a terminal running build commands, and a real-time container monitoring dashboard, illustrating a high-tech, integrated development environment.


Styling with Tailwind CSS

I paired Astro with Tailwind CSS because it fits perfectly with component-based thinking.

Benefits I noticed:

Since Astro doesn’t force CSS-in-JS, Tailwind works without friction. My styles are predictable, lightweight, and easy to maintain.

Performance and SEO Wins

After deploying the site, the results were immediately noticeable:

Because most pages are static HTML, search engines crawl them effortlessly. No hydration delays, no rendering flashes.

For a personal portfolio, this matters a lot—especially when recruiters open your site on slower networks.

What I Learned

Building my portfolio with Astro + React Islands taught me an important lesson:

Not every website needs to be a full SPA.

By being intentional about where I use JavaScript, I ended up with a site that’s:

Astro didn’t replace React for me—it refined how I use it.

Final Thoughts

If you’re building a portfolio, blog, or content-heavy website, I genuinely believe Astro is one of the best tools available right now. Pairing it with React Islands gives you performance by default and interactivity only where needed.

This setup helped me build a portfolio that truly represents my skills—not just visually, but architecturally.

If you care about speed, clarity, and modern frontend practices, Astro + React Islands is a combination worth exploring.

More from the blog

Why Every Developer Should Learn Docker in 2026
Deployment

Why Every Developer Should Learn Docker in 2026

In 2026, Docker is no longer optional. From cloud-native apps to AI workloads, containerization has become a fundamental skill every developer must master.

21 Jan

Beyond the Hype: Why Next.js Doesn't Fit My Workflow
Web Development

Beyond the Hype: Why Next.js Doesn't Fit My Workflow

A critical look at why I’m ditching Next.js complexity for a leaner, more predictable development workflow.

28 Jun