ApiReactFunctions
Function: useAsync()
function useAsync<T>(load, deps): AsyncState<T>;Defined in: packages/react/src/use-async.ts:12
Runs load, and again whenever deps change. Until the answer for the
current deps arrives it is loading; an answer for older ones is dropped.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
load | () => Promise<T> |
deps | DependencyList |
Returns
AsyncState<T>