Tech With Sai Logo

Getting Started with Next.js App Router

Sai Krishna
Next.jsReactWeb Development

Next.js has revolutionized React development. With the introduction of the App Router, building highly interactive, scalable, and optimized applications has never been easier.

Server Components

By default, components inside the App Router are React Server Components. This allows you to render UI on the server, resulting in:

  • Zero client-side JavaScript for the component itself.
  • Direct access to backend resources (like our markdown files).
  • Better Search Engine Optimization (SEO).

Static Export

For this blog, we are using the output: 'export' configuration in next.config.mjs. This tells Next.js to generate static HTML and CSS for our entire application during the build process.

The output is a fully static site that we can host on platforms like Cloudflare Pages for unparalleled global performance.