Server-by-default
In the Next.js 15 App Router, every component is a React Server Component (RSC) by default. That means it runs on the server, never ships to the browser as JavaScript, and can await server resources directly β databases, files, secrets.
// app/posts/page.tsx (Server Component)
import { db } from '@/lib/db';
export default async function PostsPage() {
const posts = await db.posts.list(); // direct DB call, server-only
return <ul>{posts.map(p => <li key={p.id}>{p.title}</li>)}</ul>;
}
The component above sends zero JS to the client. The browser receives HTML with the data already rendered. No useEffect, no loading spinner, no fetch wrapper. This is the biggest reset in React patterns since hooks.
