How to Fix the React ‘useEffect function must return a cleanup function or nothing’ Warning Message?
Published in
2 min readJun 24, 2021
If we have async functions in our useEffect
hook, we may get the ‘useEffect function must return a cleanup function or nothing’ warning in our console.
In this article, we’ll look at how to fix this warning.