Skip to content
Advertisement

Tag: use-effect

TypeError: func.apply is not a function

I’m trying to use useEffect function like that: But when I try to use data variable it sometimes throws this error: I don’t know, where do I miss. Answer You can only pass a normal function as argument to useEffect, and not an async function. In order to use async await in useEffect, you can write your function as an

Advertisement