Skip to main content

Post page kit

The redesigned post page, one component at a time. Each one lives in its own folder under src/components/, styled with a CSS Module and the site tokens (ADR 0007), and takes its content as props, so a folder can be copied to another React site that defines the same tokens. The number after each name is its tag on the design canvas. The props each one takes are documented at the top of its index.js.

The examples use the longest post on the site, Understanding Modern Routing in the React Ecosystem. Every blog post renders with these components (a post opts out with kit: false in its front matter); how each one is wired is in project-docs/architecture.md § Post page kit.

Page chrome​

Reading progress · 02​

The navbar's gradient hairline, filled as you read. Scroll this page to see it move.

Reading bar · 01​

Scroll down past this point: a slim bar slides in at the top with the page title, the current section and the time left. Scroll up and it gets out of the way.

Table of contents · 13​

The contents of this page, grouped into chapters. It follows you as you scroll.

Back to top · 34​

Contents dock · 35​

Phones only: open this page on a phone (or narrow the window below 997px) and a dark pill appears at the bottom. Tap it for the contents sheet.

Post header​

Tech blog77 min read

Understanding Modern Routing in the React Ecosystem

Pere PagesSoftware Engineer

Eyebrow · 04, title · 05, byline · 06, share · 08.

What's inside · 07​

Cover · 09​

React Router v7 — modern routing in the React ecosystem

The gist · 12​

[Lead sentence written by /post-gist]

  • [Decision or action 1]
  • [Decision or action 2]
  • [Decision or action 3]

Body text​

Lead paragraph and highlight · 10, 11​

Routing in React has evolved from simple client-side navigation into a larger architectural concern. Today, routes can define not only which component appears for a URL, but also how data is loaded, how mutations happen, how errors are handled, and how layouts are nested.

Section and sub-headings · 14, 15​

The short history

What exactly were the “Remix ideas”?

Shown as paragraphs here so they don't add to this page's outline; in a post they render h2 and h3. Hover the section heading for its copy-link chip.

Prose, inline code, glossary term · 16, 17, 27b​

Remix swapped framework-specific objects for the WHATWG Fetch APIs the browser already gives you — Request, Response, FormData — so the same code runs with SSR · server-side rendering. The server renders real HTML per request; the client then hydrates it.Glossary → or in the browser. Bold stays the text colour.

Step list · 18​

  1. Declarative ModeYou render the router
  2. Data ModeThe router owns the data
  3. Framework ModeRoutes become files

Pull quote · 36​

That mapping is real — but it is a surface analogy, not the same machinery.

From React Router v7 vs Next.js App Router

Definition · 23​

DefinitionRoute

A route is a URL-driven application boundary that owns a slice of UI, data loading, mutations, errors, and nesting.

Rich blocks​

Data table · 19​

On a phone each row turns into a card.

PeriodMain ideaKey features it introducedTechnologies
Pre-2020Client-side routing maturesclient <Link> / <Route> navigation, URL params, route-based code-splittingReact Router v3/v4/v5, Reach Router, Next.js Pages Router
2021Full-stack route modulesloader (read) + action (write), progressive enhancementRemix
2022Data routers enter React RoutercreateBrowserRouter, useNavigation / useFetcherReact Router 6.4
2022Server-first routing becomes mainstreamReact Server Components, nested layout.tsx, loading.tsx streamingNext.js 13 App Router
2024Remix merges back into React Routerroute modules as a framework, typed routes, the Vite pluginReact Router v7 Framework Mode
2025+Two main models dominateconvergence — file-based routing, SSR + streaming, typed routes, server mutations on both sidesReact Router Framework Mode vs Next.js App Router
The short history of React routing

Rating pills · 20​

Sample from The Problems Every Web Framework Is Trying to Solve.

KnowledgeCarries over?
HTTP and how the web worksYes
How deployment worksMostly
The framework's rules and habitsPartly
The language's syntax and behaviourNo

Legend:stronggoodmediumweak

Diagram frame · 21​

React routing evolution
Pre-2020Client routing2021Remix2022RR 6.42022Next.js 132024RR v72025+Two models
Diagram 3 of 21Zoom here, or open it full screen.

Code frame · 22​

app/routes/user.tsxTSX
export async function loader() {
  return getUser();
}
 
export async function action() {
  return updateUser();
}
 
export default function UserRoute() {
  return <UserPage />;
}

Callout · 24​

Disclosure · 25​

They rhyme on the surface: React Router ↔ Next.js App Router5 rows

loader → async Server Component · action → Server Action · ErrorBoundary → error.tsx · useNavigation → loading.tsx · <Outlet /> → layout.tsx

Audio player · 26​

No audio file in this demo, so it shows the empty state.

[Episode title]Listen to this post0:00 / --:--

Glossary · 27​

SPAsingle-page application
One HTML document; the client router swaps views in place without full reloads.
MPAmulti-page application
The classic model: every navigation loads a fresh HTML document from the server.
CSRclient-side rendering
The browser builds the UI from a JS bundle after loading a nearly-empty shell.
SSRserver-side rendering
The server renders real HTML per request; the client then hydrates it.
SSGstatic site generation
HTML rendered once at build time and served from a CDN.
ISRIncremental Static Regeneration
Next.js feature that rebuilds static pages after deploy, on a schedule or on demand.

6 terms shown

End matter​

References · 28​

  1. [1]reactrouter.comReact Router docs — Picking a ModeExplains the three React Router modes: Declarative Mode, Data Mode, and Framework Mode.↩ in text
  2. [2]reactrouter.comReact Router docs — Framework Mode routingDescribes how routes are defined in Framework Mode.
  3. [3]nextjs.orgNext.js docs — App RouterDocuments the Next.js App Router model.

Tags, edit link, share · 29, 30, 08​

Spotted a mistake? Suggest an edit on GitHub

Found it useful? Pass it on.

XLinkedIn

Up next · 37​

In a post it sits under the table of contents and fades in past 80% of the post.

Post navigation · 31​

Comments · 32​

Comments

Powered by GitHub Discussions

Ask a question or share what worked for you. Comments load from GitHub Discussions once you allow them.