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
Thomas Johnson -
gleamso -
coinbuck -
Rijal Ghodi -
Top comments (0)