Skip to content

BlockComponents

BlockComponents<TBlock> = { [K in TBlock["blockType"]]?: ComponentType<BlockComponentProps<Extract<TBlock, { blockType: K }>>> }

Defined in: packages/react/src/components/RenderBlocks.tsx:28

Map from a block union’s blockType discriminants to their renderers.

Keyed by TBlock["blockType"] with each entry receiving the Extract-narrowed variant — a map typed against a generated union (e.g. PageBlock) gets per-renderer field autocomplete, and object literals get excess-property errors on typo’d keys.

TBlock extends RenderableBlock