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
Justin L Beall -
Sariah -
Rishi karanam -
Orli Dun -
Top comments (0)