slorber / react-async-hook

React hook to handle any async operation in React components, and prevent race conditions
https://sebastienlorber.com/handling-api-request-race-conditions-in-react
1.19k stars 45 forks source link

Accept `undefined` on `onSuccess`/`onError` #87

Open fsmaia opened 2 years ago

fsmaia commented 2 years ago

Fixes #86

fsmaia commented 2 years ago

I think we need to bump the TypeScript version to support optional chaining.