use-async-2
v0.0.0
Published
## How to use
Downloads
1
Readme
use-async
How to use
import { useAsync } from "use-async-2";
function Component() {
const { value, loading, error } = useAsync<number>(() => {
return new Promise((resolve) => {
setTimeout(() => {
resolve(1);
}, 1000);
});
});
}