ApiReactFunctions
Function: useCan()
function useCan(
spaceId,
action,
target
): boolean;Defined in: packages/react/src/use-space.ts:68
Whether this account may create in a collection (target = its name), or
edit / delete a record (target = its key). False until known — for
hiding a button rather than showing an error.
Parameters
| Parameter | Type |
|---|---|
spaceId | string |
action | "delete" | "create" | "edit" |
target | string |
Returns
boolean