
This is part of a series on the modern web stack, written from a WordPress developer’s seat for people who’ve built on the web for years and still hit stack terms they can’t define. The goal is literacy, enough that you can read any stack list and know what each piece does.
Each post has a 10-15 minute audio companion, generated with NotebookLM, for the gym or the commute.
Someone telling you their app is “built in Next.js” says about as much as someone telling you their site is “built in WordPress.” True, and almost useless for understanding what they built. Both names cover a vast range of choices.
Next.js is the framework that took over the React world. Two of every three modern web job posts mention it, most new React tutorials assume it, and Vercel talks about it as if it were the only way to use React. PHP fragmented into Laravel, Symfony, Drupal and WordPress, while React consolidated almost entirely around Next.js.
The rest of this post covers what Next.js is, why it won, and how to think about it if your idea of a framework came from WordPress.
What Next.js Adds to React
React on its own is a UI library: components, state, and an efficient way to update the DOM. Build a real application with just that and you’d still be missing almost everything:
- URLs, and a way to decide which component renders for each one
- Loading data from the server before the page renders
- Rendering the initial HTML on the server so search engines can read it
- A build pipeline that bundles everything for production
- A deployment story
- Conventions for organizing the project so other developers can read it
Next.js supplies all of it: routing, server-side rendering, data fetching, build tooling, the deploy pipeline and file structure conventions. It’s a framework in the way WordPress is one, a system of opinions about how an app should be put together, with hooks for when you need to deviate.
File-based routing
Routing comes from your folder structure, not from a router config or WordPress’s rewrite rules plus template hierarchy.
A file at app/about/page.tsx gives you a page at /about. A file at app/blog/[slug]/page.tsx gives you a dynamic route at /blog/anything, where the brackets mean “this part is a variable, pass it as a prop.”
app/
├── page.tsx → /
├── about/
│ └── page.tsx → /about
├── blog/
│ ├── page.tsx → /blog
│ └── [slug]/
│ └── page.tsx → /blog/whatever
└── api/
└── posts/
└── route.ts → /api/posts (a JSON endpoint, not a page)
That last one is the equivalent of a REST API endpoint. API routes and pages live in the same project, which is one of the bigger shifts compared to a “WordPress backend plus decoupled React frontend” setup.
Server components vs client components
Server versus client components confuses people most, so it gets its own section.
In modern Next.js, every component is a server component by default. It runs on the server, fetches data, returns HTML and ships no JavaScript to the browser. You can use async/await directly inside it to load data. You can’t use useState, useEffect or browser-only APIs.
When you need interactivity (state, event handlers, browser APIs), you add 'use client' at the top of the file. That component and everything below it in the tree becomes a client component. It’s still rendered on the server first for the initial HTML, then JavaScript ships to the browser to make it interactive, a step called hydration.
// app/posts/page.tsx (a server component, can fetch data directly)
import { db } from '@/lib/db';
export default async function PostsPage() {
const posts = await db.posts.findMany();
return (
<div>
{posts.map(p => <PostPreview key={p.id} post={p} />)}
</div>
);
}
// app/components/LikeButton.tsx (a client component, has interactivity)
'use client';
import { useState } from 'react';
export function LikeButton({ initial }: { initial: number }) {
const [likes, setLikes] = useState(initial);
return <button onClick={() => setLikes(l => l + 1)}>{likes} likes</button>;
}
The intuition that took me longest to absorb: server components are a more elegant version of PHP server rendering. They run once on the server, hit the database and return HTML. Client components are the interactive bits that have to live in the browser. Most modern apps are mostly server components with small islands of client interactivity, and you decide the line file by file.
Data fetching
In a server component, data fetching is an await. There’s no useEffect and no loading state in that component. Next.js handles the loading UX through a sibling file called loading.tsx.
const posts = await fetch('https://api.example.com/posts').then(r => r.json());
That fetch runs on the server before the page goes to the browser, so the HTML the user receives already contains the posts. No spinner, no client-side waterfall.
For data loaded after the page is up, in response to a click for example, you use a client component and either fetch directly or reach for SWR or TanStack Query. Server components are the default, and they don’t cover every case.
Server actions
The newest piece is server actions. You write a function that runs on the server, mark it with 'use server' and call it from a client component as if it were local. Next.js makes the network call for you.
// app/actions.ts
'use server';
import { db } from '@/lib/db';
export async function createPost(formData: FormData) {
await db.posts.create({ data: { title: formData.get('title') as string } });
}
// app/new-post/page.tsx
import { createPost } from '../actions';
export default function NewPostPage() {
return (
<form action={createPost}>
<input name="title" />
<button type="submit">Save</button>
</form>
);
}
That form posts to the server, runs createPost and updates the database. There’s no API endpoint to write and no fetch call to wire up. Server actions change how you build apps, and WordPress has no real analogue for them.
The WordPress Analogue
Next.js is to React what WordPress is to PHP. Both began as tools with opinions about how to structure a particular kind of web project: WordPress codified publishing content on the web, and Next.js codifies modern web applications. Each grew into an ecosystem with real gravitational pull because it made the boring infrastructure decisions for you.
Both also favor convention over configuration. Folder layout and naming matter, and straying from the conventions makes the framework fight you. PHP developers who tried Laravel after WordPress know the feeling, and React developers reaching for Next.js are having the same experience now.
App Router vs Pages Router
Next.js comes in two flavors, and you’ll meet codebases using either.
App Router
The modern default, shipping since Next.js 13 in late 2022. It brings server components, layouts, nested routing, server actions and streaming. New projects use it, and every tutorial since 2024 teaches it.
Pages Router
The older paradigm, around since Next.js first shipped in 2016. It has no server components, and data fetching goes through getServerSideProps and getStaticProps. It’s still supported and works fine, but the framework’s energy has moved to App Router. Inherit a codebase from before 2023 and you’ll likely find Pages Router and a slow migration plan.
The Tools Around Next.js
| Tool | What it does | Notes |
|---|---|---|
| Vercel | The company behind Next.js, and the default host | Covered in hosting beyond Kinsta. Strong defaults, and you can self-host too. |
| Turbopack | The bundler Next.js uses by default | The next-generation tool replacing Webpack inside Next.js. |
| Tailwind | The CSS solution most Next.js projects use | Covered in the Tailwind and shadcn post. |
| Drizzle / Prisma | ORMs for talking to your database | Covered in the ORM post. |
| Supabase / Neon | Databases your app talks to over the network | Covered in beyond shared MySQL. |
| Auth.js / Clerk | Auth solutions, with Clerk the polished commercial option | Covered in auth in 2026. |
A job ad listing all of these describes the default modern stack: Next.js, Tailwind, Drizzle, Supabase, Auth.js and Vercel. They all assume the others exist, so learning one makes the rest easier.
What This Changes for WordPress People
Once Next.js clicks, three things open up.
Full applications
You can build applications, not just websites. WordPress can be coaxed into an app platform with custom post types, custom fields, REST endpoints and a thousand plugins, but it works against its publishing-centric design the whole way. Next.js was built for apps. For client work with user accounts, dashboards, multi-step workflows or anything beyond content with comments, reaching for it stops feeling like a leap.
Hybrid sites
You can use WordPress as a headless backend and Next.js as the frontend. Editors keep the admin they know, and visitors get a faster, more interactive site. It suits many agency-style projects, and the headless WordPress post covers it properly.
Useful AI tooling
Most AI coding assistants are trained heavily on Next.js code, so an agent pointed at a Next.js project produces competent suggestions. Point it at a WordPress codebase from 2018 and the results are much worse, because the training data is sparser and noisier. Modern stack literacy compounds with AI dev productivity.
Where Next.js Trips People Up
A handful of things to brace for.
The router split
When you search Stack Overflow or read blog posts, check the date. Pages Router patterns won’t work in App Router and vice versa, and most pre-2023 tutorials are subtly wrong now.
Server components feel odd the first week
You’ll reflexively reach for useState, get a build error and remember you’re in a server component. The mental model settles in.
Hydration mismatches
If your server-rendered HTML differs from what the client renders on first mount, React throws an error in the console. Common causes are date formatting that depends on locale, random IDs generated on each render, and conditional rendering based on window. The fix is usually to delay the inconsistent rendering until after hydration.
Two directives that aren’t interchangeable
'use client' marks the boundary where client-side JavaScript starts. 'use server' marks a function as a server action exposed to the network. Mixing them up produces errors that are hard to read.
Hosting outside Vercel
Vercel is the default host, and Next.js also runs on Cloudflare, Netlify, Fly.io or your own Node server. Each has quirks for features that depend on Vercel-specific infrastructure: image handling, ISR and certain edge features. A project that deliberately avoids Vercel means reading deployment-specific configuration. When not to use Next.js covers the cases where it’s the wrong choice altogether.
Build Something Real in Next.js
If you want to build in Next.js rather than just recognize it in conversation, these are worth your time.
Video
Start with “Next.js in 100 Seconds” on Fireship for orientation, then the Next.js App Router course on Vercel’s YouTube channel (about two hours, well paced). Lee Robinson, formerly head of developer relations at Vercel, walks through the major Next.js features on a real project. Some of it dates quickly, so check the upload date.
Docs
The Next.js Learn course is an interactive tutorial that builds a small dashboard app over a few evenings. The Next.js docs are the reference, and the search bar beats the navigation. Vercel’s templates gallery has real projects you can clone and read to see how the pieces fit in production code.
The next post covers the cases where Next.js is the wrong answer: what Astro, React Router 7 (the merged Remix), SvelteKit and Nuxt are for, and when you’d reach for them instead. If React itself still feels foreign, React in WordPress terms comes first, and why the modern web feels alien opens the series.

Leave a Reply