minca
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

ParameterType
spaceIdstring
action"delete" | "create" | "edit"
targetstring

Returns

boolean

On this page