• Preparing search index...
  • The search index is not available
Lens SDK Reference
  • Lens SDK Reference
  • @lens-protocol/react-native
  • Core
  • useFeedHighlights

Function useFeedHighlights

  • useFeedHighlights(args): PaginatedReadResult<FeedHighlight[]>
  • Fetch a the highlights of a feed for given profile and filters.

    You MUST be authenticated via useLogin to use this hook.

    Parameters

    • args: {
          limit?: InputMaybe<LimitType>;
          where?: InputMaybe<FeedHighlightsWhere>;
      }

      UseFeedHighlightsArgs

      • Optional limit?: InputMaybe<LimitType>
      • Optional where?: InputMaybe<FeedHighlightsWhere>

    Returns PaginatedReadResult<FeedHighlight[]>

    Example

    import { useFeedHighlights, ProfileId } from '@lens-protocol/react';

    function Feed({ profileId }: { profileId: ProfileId }) {
    const { data, loading, error } = useFeedHighlights({
    where: {
    for: profileId,
    },
    });

    if (loading) return <div>Loading...</div>;

    if (error) return <div>Error: {error.message}</div>;

    return (
    <ul>
    {data.map((item) => (
    <li key={item.id}>
    // render item details
    </li>
    ))}
    </ul>
    );
    }
    • Defined in packages/react/src/discovery/useFeedHighlights.ts:50

Settings

Member Visibility

Theme

Lens SDK Reference
  • @lens-protocol/react-web - v2.3.2
  • @lens-protocol/react-native - v2.3.2
  • @lens-protocol/client - v2.3.2