The SoundCloud user ID. Pass undefined to skip the request.
Hook result with data as a SoundCloudUser, plus loading and error states.
import { useUser } from "soundcloud-api-ts-next";
function UserProfile({ id }: { id: number }) {
const { data: user, loading } = useUser(id);
if (loading) return <p>Loading...</p>;
return <h1>{user?.username}</h1>;
}
Fetch a single SoundCloud user profile by ID.