I just updated to the newest version of react-async (8.0.0) and the new promise prop is giving me some trouble.
I'm trying to use the promise prop after my useAsync hook, as described in the release notes, but I'm getting a runtime error "TypeError: Cannot read property 'then' of undefined".
const { data: result, run, setData, promise } = useAsync({
promiseFn: getPhoto,
deferFn: postPhoto,
userId: userId
});
promise.then(res => setData(res));