skip to content

Meta-framework concepts

8 roadmaps156 questionsupdated

When a route's HTML is built, how URLs map to nested layouts, where data is read and cached, and what the server and browser each run. Asked because the mode is an architecture decision, not a flag.

on this pageshow

guide

overview

~2 min

A meta-framework wraps a component library with the decisions the library leaves open: when each route's HTML is produced, how a URL maps to code, where data is read and kept, and which code runs on the server and which in the browser. Interviewers probe these concepts because each one is an architecture decision whose consequences a configuration flag hides. A render mode fixes how fresh a page can be and what every request costs. A module on the wrong side of the server/client seam can ship a credential to every visitor. A cached copy with the wrong scope can show one user another user's account. The hub has five sections. [Render modes and activation](/topics/fe-meta-frameworks-concepts-rendering) covers when HTML is made (at build, per request, regenerated out of band, or streamed in pieces) and what the browser needs to make it interactive. [Execution placement](/topics/fe-meta-frameworks-concepts-execution) covers where a module, a value or a request executes, secrets included. [Routes and layouts](/topics/fe-meta-frameworks-concepts-routing) covers how a URL becomes a chain of nested layouts and how client navigation replaces only part of it. [Data loading and caching](/topics/fe-meta-frameworks-concepts-data) covers where a route reads and writes, which copies of the result exist and who may see each. [Deployment and hosting](/topics/fe-meta-frameworks-concepts-deployment) covers what a build emits, what a host must supply, and what breaks when releases overlap. Learn render modes first: every other section assumes you can say when a page's HTML was produced and for whom. Take execution placement and routing next, then data and caching, which combine all three; deployment comes last, because most of its failures are earlier choices meeting a real host. Questions run from a junior asked what hydration is to a senior tracing a leaked account or a purge that reached only one instance. Frameworks name these mechanisms differently; learn the mechanism and map your own framework's names onto it.

primer

Seven ideas carry most of the subject. Hold them firmly and the questions below read as consequences rather than separate facts. - **Every route has a render time, and that time is a promise.** HTML made during the build is cheap to serve and only as current as the last build. HTML made per request is current but charges render time, data work included, on every hit. Background regeneration and streaming are deliberate compromises between the two. Asking "when was this HTML produced, and for whom?" settles a large share of rendering questions. - **Request-bound input decides whether output can be shared.** Values that travel with the request and differ by caller, such as cookies and headers, make a response personal. Personal output cannot be prerendered, and storing it where other callers can be served it is a data leak, not a performance bug. Some frameworks infer this by observing which inputs a render read; others make the route declare it. - **The server/client seam is a security boundary that imports enforce.** The browser downloads whatever client code imports, directly or transitively, so a secret stays safe only while no such import path leads to it. Environment values, modules and the data handed to the client each cross the seam under their own explicit rule, and each rule has a classic leak. - **Server-rendered pages are delivered twice.** The HTML paints first; interactivity needs the component code plus the values the markup was built from. That second delivery has a download and processing cost of its own, and how much of the page receives it is a design choice, not a given. - **A URL resolves to a chain, not a page.** Path segments map to nested layouts, and an in-app navigation compares the old chain with the new one so that only the changed part re-runs. That comparison decides what refetches, what keeps its state and where request waterfalls form. - **Every cached copy has a key, a scope and a way to be invalidated.** Copies on the server are shared, copies in the tab are private, and no copy notices by itself that its source changed. Most stale-page and wrong-account incidents come down to one of those three properties being wrong. - **Production is a different machine from the dev server.** The build runs your code, the host may be a long-lived process, per-request functions or plain files, and several instances and releases run at once. A whole class of failure exists only there.

Request-time rendering
Producing a route's HTML on the server for each incoming request, so the response is current and can depend on who is asking.
Prerendering
Running a route's data loading and render during the build and storing the resulting HTML, which every visitor then receives unchanged.
Background regeneration
Refreshing a stored prerendered page outside any visitor's request once it is due, while the existing copy keeps being served.
Streaming
Sending a route's HTML in pieces over one open response: a shell first, then each slow region's markup as its data resolves.
Commit point
The moment a response's status and headers leave the server; after it, a render can change only the body, not redirects, status or cookies.
Hydration
The browser step that attaches behaviour to server-rendered markup using downloaded component code and the values the server used.
Islands
A hydration scope where only regions declared interactive receive client code, and the rest of the page stays inert HTML.
Server/client boundary
The line between code that runs only on the server and code shipped to the browser, enforced by what client entry points import.
Serialized payload
Data embedded in the page so the client starts from the same values the server rendered with; only plain data survives the trip intact.
Public environment variable
A configuration value the build is allowed to inline into client code, usually marked by a reserved name prefix or an allowlist.
Per-request interception
A step that runs before a route is resolved or served from cache, able to rewrite, redirect, answer directly or add headers.
Nested layout
A route module that wraps every route below it and stays mounted while navigation changes only deeper segments.
Revalidation
Marking a cached copy stale, by path, by label or by an elapsed freshness window, so the next request produces it again.
Deployment adapter
The build step that packages one application for a specific host: a server entry, per-request functions, an edge bundle or plain files.
Version skew
A browser still running one release's client code while the server already serves the next, breaking chunk loads, write targets or payload shapes.
Edge execution
Running server code at many locations close to users instead of in one region, which shortens the browser hop but not the hop to data.

The five sections describe one request's life, so they depend on each other in a fairly fixed order. **Render modes set the baseline.** Whether a route is prerendered, rendered per request, regenerated or streamed decides which later mechanisms apply at all. A prerendered route's render sees no request, so it cannot read a cookie; a streamed route has a commit point after which status and headers are fixed, which constrains redirects, error pages and session handling in the routing and data sections. **Execution placement draws the seam the rest must respect.** Data loaded on the server reaches the browser as a serialized payload, which is why [client cache seeding](/topics/fe-meta-frameworks-concepts-data-client-handoff) and [hydration](/topics/fe-meta-frameworks-concepts-rendering-hydration) lean on the same handoff. Interception runs ahead of the router, so it looks like the natural home for authentication; the execution and data sections both explain why the real check belongs further in. **Routing defines the unit of work.** Because a URL resolves to a chain of segments, data fetching, head metadata, error handling and client navigation are all organised per segment. A waterfall in [route-level fetching](/topics/fe-meta-frameworks-concepts-data-route-fetching) is usually a shape problem in the route tree as much as a data problem. **Data and caching combine the first three.** A cached copy is a render or a fetch result, stored on one side of the seam, keyed by some part of the route. Invalidation only makes sense once you know which copies a render mode produced and where they live, and [session and request context](/topics/fe-meta-frameworks-concepts-data-session-context) is where request-bound input meets those shared copies. **Deployment tests every earlier assumption.** The adapter decides whether a process survives between requests, which decides whether process memory can hold cached pages or regeneration state; several instances turn one cache into many; a static export removes everything that needed per-request code; and [version skew](/topics/fe-meta-frameworks-concepts-deployment-version-skew) appears because an open tab keeps the previous release's client while the server moves on.

  1. Request-Time Rendering →

    Per-request server rendering is the baseline every other mode modifies; learn what it gives the browser and what each request pays for it.

  2. Build-Time Prerendering →

    The opposite end of the freshness and cost scale; the contrast frames regeneration, streaming and the static versus dynamic distinction.

  3. Hydration Scope & Cost →

    What the browser must download after the HTML paints, the cost that most performance questions in this hub come back to.

  4. Server-Only Code Isolation →

    The seam that decides what ships to the browser; secrets, embedded payloads and environment rules all build on it.

  5. Persistent Nested Layouts →

    The segment chain is the unit that fetching, head metadata, error handling and client navigation are organised around.

  6. Cache Placement & Scope →

    Where copies live and who may see each; needed before invalidation, client cache seeding and any leaked-data scenario.

  • Treating the render mode as a speed setting and never saying what it costs in freshness, or who sees an old page when content changes.

  • Reading a cookie or header in a route meant to be prerendered; depending on the framework it silently becomes per-request or raises an error.

  • Assuming a module is server-only because of where it lives; one import from client code pulls it, and anything it holds, into the browser bundle.

  • Giving a secret the public prefix for a quick test; once a build ships it, removing the prefix does not recall it, so rotate the value.

  • Treating an interception-step redirect on a missing cookie as access control; the data step and every write handler still have to verify who is asking.

  • Storing a response computed from one visitor's request, such as a detected language or identity, under a key that ignores that input, so a shared cache replays it.

  • Trusting the page that rendered a form to have checked permission; the write handler behind it is a public URL and must validate on its own.

  • Testing only against the dev server, where caches are off and prerendering is skipped; stale-data and build-time failures surface first in production.

  • Expecting an atomic deploy to prevent version skew; open tabs keep running the old client against the new server.

The same handful of choices recurs in every section; naming the one in play is often the strongest part of an answer. - **Freshness versus cost per request.** Build-time output is cheap and ages; per-request output is current and pays every time; regeneration and freshness windows sit in between and buy cheapness by accepting that some visitors see an older page. The deciding question is how wrong a page may be, and for how long. - **Early bytes versus a complete first response.** Holding the response until all data resolves gives one finished document and full control of status and headers; streaming paints sooner but commits those headers early. Choose by whether a late region could change what the response means. - **Interactivity versus script budget.** Hydrating the whole route is the simplest model to reason about; islands or script-free routes ship far less but limit where state and behaviour can live. - **Shared copies versus personal correctness.** A shared cache multiplies throughput and multiplies the damage of a wrong key. Personalised content usually wants a private copy or none. - **Closeness to users versus closeness to data.** Running server code near the visitor shortens one network hop and can lengthen every hop to the database. - **Managed hosting versus self-hosting.** A platform supplies shared caches, asset serving and per-route packaging; leaving it moves those duties onto the team.

Several shapes recur across sections under different names; spotting them places an unfamiliar question quickly. - **Find the commit point.** Status codes, cookies and redirects ride on response headers, so anything decided after the headers leave can change only markup. The shape appears in streaming, not-found handling and session refresh. - **Follow the import graph.** Secret leaks, oversized client bundles and server-only modules in the browser are all traced by walking the imports outward from client code. - **Name the copy before purging it.** Invalidation works by path, by label or by time; a fix that does not say which copy it targets, on which instance and behind which outer cache, is incomplete. - **Diff the chain.** Client navigation, persistent layouts, segment-level data loading and prefetch payloads all come from comparing the current segment chain with the next one. - **Treat every URL as public.** Write handlers, in-app endpoints and interception rules are reachable by anyone who can send a request, so the checks live where the work happens.

explore

report an issue with this guide →

questions

156 · 5 sections

When a meta-framework refreshes a prerendered page out of band instead of rebuilding the site, what does a visitor receive while that render runs?

level: juniorimportance: must knowfreq 70%
basics
~20 s

The stored prerendered copy, served immediately. The refreshed render runs outside that request and replaces the stored copy when it finishes, so only later visitors see the new HTML: nobody waits for the refresh, but whoever arrives during it gets the older page.

open as a page

In a meta-framework, what does prerendering a route at build time mean, and what happens when a visitor requests it?

level: juniorimportance: must knowfreq 72%
basics
~20 s

Prerendering at build time runs a route's data loading and render once, during the build, and writes the finished HTML into the build output. Every visitor is then served that same file, with no per-request fetch or render.

open as a page

In a server-rendered route, what is hydration, and what must the browser be handed for it to happen?

level: juniorimportance: must knowfreq 80%
basics
~20 s

Hydration is a server-rendered route's second delivery: after the finished HTML paints, the browser downloads the component code and the data the server rendered with, then attaches behaviour to the existing markup instead of rebuilding it.

open as a page

When a meta-framework renders a route's HTML on the server for every request, what does the browser receive and why does it help?

level: juniorimportance: must knowfreq 82%
basics
~20 s

The browser receives a finished document: the framework matched the URL, ran that route's server-side data work and rendered markup before replying. Content is visible in the first paint, and machines that never run scripts can read it.

open as a page

In a meta-framework that prerenders routes at build time, which inputs make a route's output request-dependent?

level: juniorimportance: must knowfreq 72%
basics
~20 s

Input that arrives with the HTTP request and differs between callers: the cookie jar, request headers, the query string, the caller's address. Reading a database, a config value or a path parameter does not, by itself.

open as a page

In a meta-framework whose routes come from the directory tree, what makes one file a page at a URL and its neighbour not?

level: juniorimportance: must knowfreq 74%
basics
~20 s

A file becomes a route only when its name matches the router's reserved route-module name, at its position under the routes directory; the folder chain becomes the URL. Every other file there is colocated code the router ignores.

open as a page

In a multi-language site, what does carrying the language in a URL path segment give you that a cookie alone does not?

level: juniorimportance: must knowfreq 62%
basics
~20 s

A language in the path gives every translation its own address, so it can be linked, bookmarked, prerendered, crawled and cached as a distinct page. A cookie-only language makes one address return different text to different visitors.

open as a page

In a meta-framework where route segments declare head entries as data, how is a URL's head built?

level: juniorimportance: must knowfreq 72%
basics
~20 s

Each matched route segment declares head entries as data. The framework collects them along the matched chain, merges them into one set, and writes that into the document head before the body, so every URL ships its own head.

open as a page

When a client router handles an in-app link click, what does it fetch instead of a full HTML document?

level: juniorimportance: must knowfreq 72%
basics
~20 s

It fetches a payload for only the route segments that differ between the current URL and the target — their data and, if missing, their code — then swaps those segments into the page that is already running.

open as a page

In a file-based router, what does it mean that one URL resolves to a chain of nested layouts rather than a single page module?

level: juniorimportance: must knowfreq 68%
basics
~20 s

Each matched path segment can contribute a route module, and the framework nests them outermost first: the top level renders the document shell, every level below renders inside its parent's slot, and the innermost module renders the page.

open as a page

In a meta-framework, how does a cached copy kept on the server differ in scope from one kept in the browser tab?

level: juniorimportance: must knowfreq 62%
basics
~20 s

A copy kept on the server is shared: any request matching its key can be served it, including another visitor's. A copy in the browser tab is private to that browser and gone on a full page load.

open as a page

On a server-rendered page, why is the data the server already read embedded in the page instead of fetched again in the browser?

level: juniorimportance: must knowfreq 72%
basics
~20 s

Embedding the server's already-loaded result lets the browser's data cache start full, so the first client render reads it from cache instead of issuing a second request for data the user is already looking at.

open as a page

A meta-framework serves a route from a stored copy. After the underlying data changes, what makes visitors see the new value?

level: juniorimportance: must knowfreq 70%
basics
~20 s

A stored copy never learns that the data behind it changed. It becomes unusable only when the application names that copy and marks it stale, or when its freshness window elapses and the next request produces the value again.

open as a page

In a meta-framework, what does a route module's own server-side data fetch do before the route's HTML exists?

level: juniorimportance: must knowfreq 78%
basics
~20 s

A route's server-side data fetch runs when the URL matches, gathers the data that route needs, and hands it to the render, so the first HTML already carries the content and the browser needs no follow-up request.

open as a page

In a meta-framework, what does it mean for a route to handle a write itself instead of posting to a separate API?

level: juniorimportance: must knowfreq 72%
basics
~20 s

A route-handled write is a server-side function the framework publishes at its own URL, so an ordinary HTML form can POST straight to it. The framework runs it on the server, then re-renders the route or follows a redirect.

open as a page

Why does a server-rendered route embed a block of serialized data in the HTML alongside the markup it already rendered?

level: juniorimportance: must knowfreq 62%
basics
~20 s

Markup is output, not input - it never says which values produced it. The embedded payload hands the client the same data the server rendered from, so the client can rebuild the identical tree without scraping the DOM or refetching.

open as a page

Moving a route's server code from one region to many locations near users: what does that make faster, and what stays the same?

level: juniorimportance: must knowfreq 56%
basics
~20 s

Running a route's server code near the user shortens only the network trip between browser and server. The work inside the handler takes the same time, and the distance from that code to its data usually gets longer.

open as a page

In a meta-framework build, what decides whether an environment variable's value reaches the browser bundle?

level: juniorimportance: must knowfreq 72%
basics
~20 s

The variable's name decides. The build substitutes into client code only names carrying a reserved public prefix, or names on an explicit allowlist; every other name is readable only in code that runs on the server.

open as a page

In a meta-framework's file-based router, what is a non-document route, and how does it differ from a page route?

level: juniorimportance: must knowfreq 68%
basics
~20 s

A non-document route is a file in the same router tree that answers an HTTP request with JSON, a file, a stream or a redirect instead of an HTML page, sharing the pages' project, build and deployment.

open as a page

In a meta-framework, what does a per-request interception step run in front of, and what can it return?

level: juniorimportance: must knowfreq 72%
basics
~20 s

A per-request interception step runs for every matching request before the framework resolves a route, renders it, or looks in its cache. It can continue, rewrite to another path, redirect, answer directly, or attach headers and cookies.

open as a page

In a meta-framework, what is a deployment adapter and what does it change about the build output?

level: juniorimportance: must knowfreq 68%
basics
~20 s

A deployment adapter translates one framework build into the exact shape a chosen host runs: a startable server entry, per-request function bundles, an edge bundle, or plain files plus routing rules. Same application code, different packaging.

open as a page

What kinds of files does a meta-framework's production build leave in its output directory, and what is each for?

level: juniorimportance: must knowfreq 68%
basics
~10 s

A production build emits content-hashed client assets, prerendered documents for routes resolved at build time, a server bundle for routes that were not, and manifests mapping routes and assets to those files.

open as a page

In a meta-framework's development server, how is a route served differently from the way the built output serves it?

level: juniorimportance: must knowfreq 72%
basics
~20 s

A development server compiles a route on demand and renders it again on every request, with prerendering skipped and the cache tiers switched off. The built output compiles once ahead of time and reuses whatever it is allowed to reuse.

open as a page

In a meta-framework app running as several instances behind a load balancer, what does a shared cache store give you that per-instance memory does not?

level: juniorimportance: must knowfreq 62%
basics
~20 s

A shared store keeps one copy of regenerated pages and cached data that every instance reads and writes, so all instances agree. Per-instance memory gives each process its own copy, and those copies drift apart.

open as a page

In a meta-framework, what is a static export, and what must a file host do to serve it?

level: juniorimportance: must knowfreq 66%
basics
~20 s

A static export runs the build once and emits only files - HTML documents, JavaScript, CSS, media - with no server process behind them. The host's job is to map each URL to a file and return its bytes.

open as a page