Making Promises in your components a breeze 🌬️
- Handle the result of your Promises easily.
- Familiar handling of side effects using
- Easy cancellation of fetch requests with
- TypeScript support out of the box.
For more information see the Getting Started guide.
Install usePromise using
yarn add @amsterdam/use-promise
npm install @amsterdam/use-promise
This library will work in every environment (Node or browser) that supports AbortController, AbortSignal, Promise.allSettled and async functions. If you need to support an environment that does not have these features make sure to include the appropriate polyfills and transformations.