useAsyncOperations
useAsyncOperations():
object
Defined in: store/StoreProvider.tsx:351
Hook to access async operation state across all ops. Reads from
state[_async] so it subscribes to the same store everything else does.
For single-op components, prefer useAsyncOperation(opId) — narrower
read API and automatic unmount cleanup.
Returns
Section titled “Returns”object
asyncOps
Section titled “asyncOps”asyncOps:
Record<string,AsyncOperation>
clear: (
operationId) =>void
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
operationId | string |
Returns
Section titled “Returns”void
clearAll
Section titled “clearAll”clearAll: () =>
void
Returns
Section titled “Returns”void
getAsyncOp
Section titled “getAsyncOp”getAsyncOp: (
operationId) =>AsyncOperation|undefined
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
operationId | string |
Returns
Section titled “Returns”AsyncOperation | undefined
getData
Section titled “getData”getData: (
operationId) =>any
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
operationId | string |
Returns
Section titled “Returns”any
getError
Section titled “getError”getError: (
operationId) =>string|undefined
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
operationId | string |
Returns
Section titled “Returns”string | undefined
hasError
Section titled “hasError”hasError: (
operationId) =>boolean
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
operationId | string |
Returns
Section titled “Returns”boolean
isLoading
Section titled “isLoading”isLoading: (
operationId) =>boolean
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
operationId | string |
Returns
Section titled “Returns”boolean