soundcloud-api-ts-next
    Preparing search index...

    Function useUserSearch

    • Search SoundCloud users by query string.

      Parameters

      • query: string

        The search query. Pass an empty string to skip the request.

      Returns HookResult<SoundCloudUser[]>

      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>;
      }