docs/solutions/runtime-errors/2026-04-07-blocks-demo-pages-must-pass-example-id.md
The standalone blocks route rendered registry examples without passing the demo
id prop that the shared Demo component expects. That left example pages like
/blocks/toc-demo with no seed key for createValue(...), and the route blew
up as a server-side 500.
http://localhost:3001/blocks/toc-demo returned 500 Internal Server Errorid={name.replace('-demo', '')}useTocElement
firstlocalhost:3002 before checking which worktree that port was
actually servingMirror the same id handoff used by ComponentPreview when the blocks route
renders a registry example.
// apps/www/src/app/(blocks)/blocks/[name]/page.tsx
<Component id={name.replace("-demo", "")} />
The matching preview path already did this:
// apps/www/src/components/component-preview.tsx
<Component {...props} id={props.id ?? name.replace("-demo", "")} />
The generic registry Demo component is not self-describing. It needs the demo
slug so it can call createValue(id) with the right seed key. Without that prop
the blocks route renders the example with id === undefined, while the docs
preview path passes the expected slug and works.
Once the blocks route passes the same derived id, standalone block pages and docs previews use the same contract again.
id, every render surface for that
example must pass it, not just the docs preview wrapperComponentPreview first. That is the canonical example-render contract in the
docs app