Typescript friendlier hook to deal with async.
npm install @desync/use-promise

!npm

!NPM
Simple hook to call a promise
```
$ yarn add @desync/use-promise
Usage:
`tsx
import ky from 'ky';
import { usePromise } from '@desync/use-promise';
type User = {
userId: number;
name: string;
username: string;
email: string;
};
const loadUsers = async (): Promise
return ky
.get('https://jsonplaceholder.typicode.com/users', {
credentials: 'include',
})
.json
};
const UserList: React.FC = () => {
const { data, error, isLoading } = usePromise(loadUsers, {});
return (
{JSON.stringify(data)}}https://codesandbox.io/s/reverent-architecture-r5c11