-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Labels
Description
Because run does not reject on error, we should expose a new promise property from useAsync and in the render props of <Async>, which rejects or resolves along with the internal promise. Probably just create a new Promise(...) along with new window.AbortController() and keep it as a ref. It can be resolved/rejected from handleResolve and handleReject.