useExplorePublications

useExplorePublications is a React Hook used to explore different publications on Lens Protocol from a variety of people that you may not yet follow.

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

Usage

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

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

Reference

useExplorePublications(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

metadataFilter: PublicationMetadataFilters (optional)

  • Any optional metadata to filter publications by

Returns

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