# Function: useCan()

```ts
function useCan(
   spaceId, 
   action, 
   target
): boolean;
```

Defined in: [packages/react/src/use-space.ts:68](https://github.com/leifriksheim/minca/blob/main/react/src/use-space.ts#L68)

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`
