The search query. Pass an empty string to skip the request.
Hook result with data as an array of SoundCloudUser.
import { useUserSearch } from "soundcloud-api-ts-next";
function UserResults({ q }: { q: string }) {
const { data: users, loading } = useUserSearch(q);
if (loading) return <p>Searching...</p>;
return <ul>{users?.map(u => <li key={u.id}>{u.username}</li>)}</ul>;
}
Search SoundCloud users by query string.