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

    Function useUserFollowings

    • Fetch users that a SoundCloud user is following.

      Parameters

      • userId: string | number | undefined

        The user ID. Pass undefined to skip the request.

      Returns HookResult<SoundCloudUser[]>

      Hook result with data as an array of followed SoundCloudUser.

      import { useUserFollowings } from "soundcloud-api-ts-next";

      function Following({ userId }: { userId: number }) {
      const { data: followings, loading } = useUserFollowings(userId);
      if (loading) return <p>Loading...</p>;
      return <p>Following {followings?.length} users</p>;
      }