Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/client/features/command-palette/hooks/useRegisterCommands

Cockpit client (features), next. Source: ui/client/features/command-palette/hooks/useRegisterCommands.tsx.

Functions#

useRegisterCommands()#

useRegisterCommands(commands): void

Defined in: ui/client/features/command-palette/hooks/useRegisterCommands.tsx:9

Registers commands while the calling component is mounted. Memoise the array: a new array identity re-registers (replacing by id, so it is safe but wasteful).

Parameters#

commands

Command[]

Returns#

void