const handleLike = async () => {
await likeTweet(tweet._id, user._id);
};
useEffect(() => {
const fetch = async () => {
const response = await fetchLikes(tweet._id);
setTweetLikes(response.data);
console.log("useEffect");
};
fetch();
}, [handleLike]);
I'm just declaring the dependencies function, not excecuting it. I don't know why it's remounting the component