Skip to main content

UsePageBlock

Returns the current PageBlock context, which means there must be a PageBlock ancestor component higher in the tree.

If optional is set to true, the hook will not throw if no PageBlock exists higher in the tree, but will just return undefined.

Example

Tsx
const { blockId, title, description, column } = usePageBlock();
Signature
function usePageBlock(props: { optional?: boolean } = {}): void

Parameters

props

parameter{ optional?: boolean }
Was this chapter helpful?
Report Issue
Edited Feb 2, 2026·Edit this page