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
Anupriya -
sharathchandark -
No Bullshit Coder -
Aarav Joshi -
Top comments (0)