useAsyncValue
Sourceimport { useAsyncValue } from "@prestojs/util";
Arguments:
Argument | Type | Description | |
---|---|---|---|
* | props An object with the properties below | ||
props.existingValues | ItemType[] | ||
props.getId | |||
* | props.id | null|IdType | |
props.onError | |||
props.onSuccess | |||
* | props.resolve | ||
props.trigger | "MANUAL"|"DEEP" |
Returns:
An object with these properties: | |||
---|---|---|---|
Property | Type | Description | |
* | error | null|Error | |
* | isLoading | boolean | |
* | reset | ||
* | run | ||
* | value | ReturnItemType|null |
Arguments:
Argument | Type | Description | |
---|---|---|---|
* | props An object with the properties below | ||
props.existingValues | ItemType[] | ||
props.getId | |||
* | props.ids | null|IdType[] | |
props.onError | |||
props.onSuccess | |||
* | props.resolve | ||
props.trigger | "MANUAL"|"DEEP" |
Returns:
An object with these properties: | |||
---|---|---|---|
Property | Type | Description | |
* | error | null|Error | |
* | isLoading | boolean | |
* | reset | ||
* | run | ||
* | value | ReturnItemType|null |