You can not have async effect. Thus you need to do following
useEffect(() => {
getPosts().then(data => setPosts(data));
}, [])
You can not have async effect. Thus you need to do following
useEffect(() => {
getPosts().then(data => setPosts(data));
}, [])
For further actions, you may consider blocking this person and/or reporting abuse
Josue Valdivia -
Meet Rajesh Gor -
Daniel Malek -
Saqib Jamil -
Top comments (0)