DEV Community

Discussion on: How to use async function in useEffect?

 
brense profile image
Rense Bakker

You can use async side effects but you would have to use React suspense. Using async side effects without React suspense is an antipattern and should be avoided because A. it makes your app really difficult to debug and B. it has the potential to cause an infinite render loop.