ui/client/features/command-palette/hooks/useRegisterCommands
Cockpit client (features), v0.9. 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