useExploreProfiles

useExploreProfiles is a React Hook used to query Lens profiles.

const { data, loading, hasMore, next } = useExploreProfiles(args)

Usage

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

function ExploreProfiles() {
const { data, loading } = useExploreProfiles();
}

Reference

useExploreProfiles(args)

Parameters

observerId: string (optional)

  • The id of the profile that is running the query, usually the logged in/active profile

limit: number (optional)

  • The amount of items to return

Returns

{
  data: ProfileFragment[],
  loading: boolean,
  hasMore: boolean, // whether there are more profiles after the current batch
  next(): () => void, // fetches the next profiles and appends to the data
}