This repository has been archived by the owner on Jan 15, 2024. It is now read-only.
Releases: jonkoops/use-promise
Releases · jonkoops/use-promise
v3.2.0
New Features ✨
- Package is now published under the
@jonkoops
organization on NPM (see migration guide).
Migration 🚚
Since the municipality of Amsterdam no longer has any interest in maintaining this library it has been moved to a new organization. The package has been renamed as follows:
@amsterdam/use-promise
➡️@jonkoops/use-promise
To upgrade your project run the following commands:
npm uninstall @amsterdam/use-promise
npm install @jonkoops/use-promise
v3.1.0
v3.0.1
v3.0.0
v2.1.0
v2.0.0
This new release introduces a way to cancel fetch requests, for more information check out the new Cancelling Fetch Requests guide.
New Features ✨
- Cancelling fetch requests based on the lifecycle of
usePromise
is now possible, check out the new Cancelling Fetch Requests guide. - There are now
isPending()
,isFulfilled()
andisRejected()
utility functions to check the status of the result, reducing boilerplate code in your statements. - New and improved documentation with guides on different topics.
Breaking Changes 💥
- The
error
field on the rejected result has been renamed toreason
to align with the defaults fromPromise.allSettled
- The
PromiseStatus
enum is no longer present, check the status of the result withisPending()
,isFulfilled()
andisRejected()
functions instead.