new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Next.js App Router · all subjects

server & client components

8 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Runtime APIs in Next.js

Runtime APIs require information that is only available when a user makes a request. These include: `cookies()` for user's cookie data, `headers()` for request headers, `searchParams` for URL query parameters, and `params` for dynamic route parameters.

Wrap runtime API access in Suspense

Components that access runtime APIs should be wrapped in `<Suspense>`. Without a Suspense boundary, accessing runtime APIs surfaces a blocking-route insight in the dev overlay.

Client Bundles definition

Client Bundles are JavaScript bundles sent to the browser. Next.js splits these automatically based on the module graph to reduce initial payload size and load only the necessary code for each page.

Client Component definition and capabilities

A Client Component is a React component that runs in the browser. In Next.js, Client Components can also be rendered on the server during initial page generation. They can use state, effects, event handlers, and browser APIs, and are marked with the 'use client' directive at the top of a file.

Hydration process in Next.js

Hydration is React's process of attaching event handlers to the DOM to make server-rendered static HTML interactive. During hydration, React reconciles the server-rendered markup with the client-side JavaScript.

RSC Payload definition

The React Server Component Payload is a compact binary representation of the rendered React Server Components tree. It contains the rendered result of Server Components, placeholders for Client Components, and props passed between them.

Server Component definition and capabilities

A Server Component is the default component type in the App Router. Server Components render on the server, can fetch data directly, and don't add to the client JavaScript bundle. They cannot use state or browser APIs.

'use client' directive definition and placement

The 'use client' directive is a special React directive that marks the boundary between server and client code. It must be placed at the top of a file, before any imports or other code. It indicates that React Components, helper functions, variable declarations, and all imported dependencies should be included in the client bundle.

Give your agent this brain