yen nhi.dev

The Future of Scalable Frontend Systems

1 min read

The Shift to RSC

The introduction of React Server Components (RSC) has completely changed how we think about full-stack web applications. By default, we now optimize for the server, and use client-side interactivity only where it's truly needed.

Why it matters

  • Zero Bundle Size: Server components don't ship their logic to the browser.
  • Data Fetching: Fetching happens closer to the source.
  • Cleaner Patterns: Less boilerplate for data management.

Example Architecture

A modern system should be data-driven and statically generated where possible.

// All detail pages are pre-rendered at build time
export async function generateStaticParams() {
  const slugs = await getSlugs("blog");
  return slugs.map((slug) => ({ slug }));
}

Embracing Constraint

By embracing the constraints of static export and RSC, we force ourselves to build more resilient and performant systems. This portfolio is a living example of that philosophy.