Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions docs/api/cozy-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,41 @@ Fetches a queryDefinition and run fetchMore on the query until the query is full

***

### useSettings

▸ **useSettings**<`T`>(`slug`, `keys`): `UseSettingsReturnValue`<`T`>

Query the cozy-app settings corresponding to the given slug and
return:

* the values corresponding to the given `keys`
* the `save()` method that can be used to edit the setting's value
* the query that manages the state during the fetching of the setting
* the mutation that manages the state during the saving of the setting

#### Type parameters

| Name | Type |
| :------ | :------ |
| `T` | extends `string` |

*Parameters*

| Name | Type | Description |
| :------ | :------ | :------ |
| `slug` | `string` | the cozy-app's slug containing the setting (special cases are: 'instance' for global settings and 'passwords' for bitwarden settings) |
| `keys` | `T`\[] | The name of the setting to retrieve |

*Returns*

`UseSettingsReturnValue`<`T`>

*Defined in*

[packages/cozy-client/src/hooks/useSetting.js:24](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/hooks/useSetting.js#L24)

***

### withClient

▸ **withClient**(`WrappedComponent`): `Function`
Expand Down
Loading