UsePageBlock
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
const { blockId, title, description, column } = usePageBlock();
Signature
function usePageBlock(props: { optional?: boolean } = {}): void
Parameters
props
parameter
{ optional?: boolean }