You could try the following:
//I assume setWishlist is local state
const [wishList, setWishlist] = useState();
//assuming you want to use loadWishlist outside the effect
const loadWishlist = useCallback(
  () =>
    //assuming getWishlist is defined outside of the component
    getWishlist(user.token).then((res) => {
      // console.log(res);
      setWishlist(res.data.wishlist);
    }),
  [user.token]//loasWishlist is re created when user.token changes
);
useEffect(() => {
  loadWishlist();
}, [loadWishlist]);//effect will run every time user.token changes