UseUpdateConfigResult
Defined in: packages/react/src/types.ts:82
Return value of the useUpdateConfig hook.
Contains the update function and the current status of the save operation.
Type Parameters
Section titled “Type Parameters”TConfig
Section titled “TConfig”TConfig
The type of the config
Properties
Section titled “Properties”error:
unknown
Defined in: packages/react/src/types.ts:109
The error object if the save operation failed, null if no error.
isError
Section titled “isError”isError:
boolean
Defined in: packages/react/src/types.ts:105
True if save status is ‘error’.
isInitial
Section titled “isInitial”isInitial:
boolean
Defined in: packages/react/src/types.ts:99
True if save status is ‘initial’.
isPending
Section titled “isPending”isPending:
boolean
Defined in: packages/react/src/types.ts:101
True if save status is ‘pending’.
isSuccess
Section titled “isSuccess”isSuccess:
boolean
Defined in: packages/react/src/types.ts:103
True if save status is ‘success’.
status
Section titled “status”status:
ManagerStatus
Defined in: packages/react/src/types.ts:107
The specific status of the save operation.
Methods
Section titled “Methods”update()
Section titled “update()”Call Signature
Section titled “Call Signature”update(
config):Promise<TConfig>
Defined in: packages/react/src/types.ts:89
Replaces the entire config with the provided value.
Parameters
Section titled “Parameters”config
Section titled “config”TConfig
The entire config
Returns
Section titled “Returns”Promise<TConfig>
The entire modified config
Call Signature
Section titled “Call Signature”update(
mutator):Promise<TConfig>
Defined in: packages/react/src/types.ts:96
Updates the config using a mutator function.
Parameters
Section titled “Parameters”mutator
Section titled “mutator”ConfigMutator<TConfig>
The function that updates the config
Returns
Section titled “Returns”Promise<TConfig>
The entire modified config