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

Function useExploreProfiles

  • useExploreProfiles(args?): PaginatedReadResult<Profile[]>
  • Discover new profiles based on a defined criteria.

    const { data, error, loading } = useExploreProfiles({
    orderBy: ExploreProfilesOrderByType.LatestCreated,
    });

    if (loading) return <Loader />;

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

    return (
    <>
    {data.map((profile) => (
    <Profile key={profile.id} profile={profile} />
    ))}
    </>
    );

    Parameters

    • Optional args: {
          limit?: InputMaybe<LimitType>;
          orderBy: ExploreProfilesOrderByType;
          where?: InputMaybe<ExploreProfilesWhere>;
      }
      • Optional limit?: InputMaybe<LimitType>
      • orderBy: ExploreProfilesOrderByType

        Order criteria for exploring profiles

      • Optional where?: InputMaybe<ExploreProfilesWhere>

        Filtering criteria for exploring profiles

    Returns PaginatedReadResult<Profile[]>

    • Defined in packages/react/src/discovery/useExploreProfiles.ts:55
  • useExploreProfiles(args): SuspensePaginatedResult<Profile[]>
  • Experimental

    Discover new profiles based on a defined criteria.

    This signature supports React Suspense.

    const { data } = useExploreProfiles({
    orderBy: ExploreProfilesOrderByType.LatestCreated,
    suspense: true,
    );

    console.log(data);

    This API can change without notice

    Parameters

    • args: UseSuspenseExploreProfilesArgs

    Returns SuspensePaginatedResult<Profile[]>

    • Defined in packages/react/src/discovery/useExploreProfiles.ts:75

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