Appearance
Type Alias: ChildBlock
ts
type ChildBlock =
| Block
| string
| number
| null
| ReactElement;Defined in: src/renderer/types.ts:75
Valid children inside a Block.
Block— nested componentstring— text contentnumber— numeric contentnull— empty slot (skipped during rendering)ReactElement— only when produced by aclient/import. The Vite build transform rewrites imports fromsrc/client/*into callable refs that returnBlockat runtime; TypeScript still reads the source.tsxand types them as React components, so the result of calling a client component is typedReactElementbut is aBlockat runtime. AcceptingReactElementhere bridges that gap so users don't needas unknown as Blockcasts. Raw JSX (<div>hi</div>) or React components imported from outsideclient/are accepted at type level but rejected at runtime with a clear error from the tree walker — use a Block factory or a client component instead.