Guides

useProfilesToFollow

useProfilesToFollow is a React Hook that lets you query suggested profiles to follow.

const { data: profiles, loading } = useProfilesToFollow()

Usage

import { useProfilesToFollow } from '@lens-protocol/react-web';

function ProfilesToFollow() {
  const { data: profiles, loading } = useProfilesToFollow();

  if (loading) return <Loading />;

  return (
    <div>
      {profiles.map((profile) => (
        <ProfileCard key={profile.id} profile={profile} />
      ))}
    </div>
  );
}

Reference

useProfilesToFollow()

Returns

{
  data: ProfileFragment[],
  loading: boolean
}