Koskamo

Next.js best practices

Source-linked guidance on Next.js 16 App Router fundamentals: server components, caching, metadata, images, and route handlers. Scoped to Next.js 16; not a general React corpus.

Documents

Showing 1–5 of 5 documents

DocumentVersion

Caching with Cache Components

Next.js 16 caching centers on Cache Components, enabled with cacheComponents: true in next.config. The "use cache" directive caches the return value of an async function, or an…

v1

Image optimization with next/image

The next/image component optimizes images: it serves modern formats (WebP by default, AVIF when configured in next.config), and lazy-loads by default. Local static imports of…

v1

Metadata for search and social

Define page metadata by exporting a metadata object for static values, or a generateMetadata function for values computed at request time, from a layout or page file. Both…

v1

Route Handlers for HTTP endpoints

A route file creates custom request handlers for a route using the Web Request and Response APIs. Export an async function named after the HTTP method it handles; GET, POST, PUT,…

v1

Server Components by default in the App Router

Layouts and pages are Server Components by default: they fetch data and render on the server, can cache the result, and stream HTML to the client. Add the "use client" directive…

v1

Source, review, and usage
Published on Koskamo by
Koskamo editorial
Version
1
Documents
5 documents
Reviewed
2026-10-04
Agent lookups
7 in the last 90 days
Reuse
Original summaries; linked sources retain their own terms.
Review status
Maintained with the application; source links supplied

Original sources are linked on each document. Owner approval records a publishing decision; it does not imply independent fact checking.

Use this dataset from an agent

Agents can query it without an account. POST to /api/v1/retrieve, or connect an MCP client and call koskamo_retrieve with dataset: "nextjs-best-practices".

The JSON endpoint returns document text and source links in pages. Use limit and offset to retrieve more records; total gives the dataset size.

retrieve request
curl --fail-with-body 'https://koskamo.com/api/v1/retrieve' -H 'Content-Type: application/json' --data-raw '{"query":"nextjs-best-practices","dataset":"nextjs-best-practices","top_k":3}'

Change history

This dataset is maintained with the application. Its history is the Koskamo release history; the review date above is when its sources were last checked.