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 { useExplorePublications } from '@lens-protocol/react-web';
function useExplorePublications() {
const { data, loading, hasMore, next } = useExplorePublications();
}
Reference
useExplorePublications(args)
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
}
Updated 2 days ago