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
Mohin Sheikh -
転職カメ -
ReadymadeUI -
Kudzai Murimi -
Top comments (0)