Core API Overview > @adpt/core > useAsync
useAsync() function
Signature:
export declare function useAsync<T>(f: () => Promise<T> | T, initial: T): T;
Parameters
Parameter | Type | Description |
---|---|---|
f | () => Promise<T> | T | |
initial | T |
Returns:
T
Adapt v0.2.0: now with Node.js v12 and v13 support, easier installs, and more! Read more...