DEV Community


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

lukeshiru profile image

Thanks for making clear since the beginning of the article that async in effects is an anti-pattern. Generally if you're in a situation in which you need async effects, you might need to think that again. You should be avoiding side-effects altogether, but if you really need them, having them as async functions is not ideal because they might produce "async side effects" and good ol' leaks.

Forem Open with the Forem app