benawad / benawad/react-hooks-examples
Async not allowed inside useEffect()
Open
- Dominant language
- JavaScript
- Stars
- 85
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
Great video and clean approach. However, it seems that in the React 16.8 this way of using async is not allowed. The console throws this error:
> Warning: An Effect function must not return anything besides a function, which is used for clean-up. It looks like you wrote useEffect(async () => ...) or returned a Promise.
Any chance you can refactor to comply?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.