My mental model of the Next.js App Router, in plain words
Server components, client components, layouts, and why the file names mean what they mean. Written in the order things actually clicked for me.
Read postSearch across posts, tags, and categories.
I did not get it for a long time. Then one day I did. Here is the exact moment that changed.
For months I treated server components like a weird Next.js quirk. I kept defaulting to use client at the top of every file because that was what I knew from the old tutorials I had watched.
Then I tried to fetch posts in a client component, and it turned into a mess of useEffect, useState, loading flags, and flicker. The same page as a server component was eight lines and had no flicker.
The thing server components solved for me is not a performance thing. It is a correctness thing. The server is where the data lives. Keep the data next to the code that uses it.
Once that clicked, I started moving everything I could back to the server. Now I only use client components for the parts that genuinely need to react to user input. Forms, modals, theme toggles. Everything else is plain HTML shipped from the server.
Server components, client components, layouts, and why the file names mean what they mean. Written in the order things actually clicked for me.
Read post