Fetch users who liked a SoundCloud track.
The track ID. Pass undefined to skip the request.
undefined
Hook result with data as an array of SoundCloudUser who liked the track.
data
SoundCloudUser
import { useTrackLikes } from "soundcloud-api-ts-next";function Likers({ trackId }: { trackId: number }) { const { data: users, loading } = useTrackLikes(trackId); if (loading) return <p>Loading...</p>; return <ul>{users?.map(u => <li key={u.id}>{u.username}</li>)}</ul>;} Copy
import { useTrackLikes } from "soundcloud-api-ts-next";function Likers({ trackId }: { trackId: number }) { const { data: users, loading } = useTrackLikes(trackId); if (loading) return <p>Loading...</p>; return <ul>{users?.map(u => <li key={u.id}>{u.username}</li>)}</ul>;}
Fetch users who liked a SoundCloud track.