v3.11.0: useAsync
It's finally here: the useAsync
hook. This adds a very promising new way to use React Async, without the need for wrapper components. An important milestone.
useAsync
is a React hook that makes working with Promises a breeze. It provides metadata such as isLoading
and startedAt
and deals with race conditions and promise cancellation.
A working usage example is provided here: https://github.com/ghengeveld/react-async/tree/master/examples/basic-hook