DEV Community

Discussion on: 💡 React Hooks: async function in the useEffect

Collapse
digitalbrainjs profile image
Dmitriy Mozgovoy

having raw async functions in the useEffect is always a bad idea
Once created, the promise cannot be stopped

Unless you're using async effects with cancelable promises :)