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 · Guides · all subjects

building/static-params

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

generateStaticParams must return at least one param

generateStaticParams must return at least one param. An empty array causes a build error.

generateStaticParams role in Cache Components

Use generateStaticParams to define which param values to prerender. When rendering routes covered by generateStaticParams, the param values are known at build time. The prerender process builds a static shell until it hits runtime APIs or uncached data. generateStaticParams returns an array of objects with the dynamic route parameters.

Param resolution order in Cache Components

Params are resolved in route order during upgrade. A param value not returned by generateStaticParams stays unresolved and prevents any deeper params from upgrading. This means if a parent route param is unknown, child route params cannot upgrade beyond the parent's App Shell.

generateStaticParams for i18n static generation

Use generateStaticParams in a layout or page to generate static routes for a given set of locales. Return an array of objects with the locale parameter, for example: [{ lang: 'en-US' }, { lang: 'de' }]. This can be global in the root layout app/[lang]/layout.

Give your agent this brain