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

Function useLazyProfilesManaged

  • useLazyProfilesManaged(): UseDeferredTask<Profile[], UnspecifiedError, ProfilesManagedArgs>
  • Experimental

    useLazyProfilesManaged is a lazy version of useProfilesManaged React Hook.

    This version doesn't support pagination!

    This hook will not fetch profiles until the returned function is called.

    This hook is experimental and may change in the future.

    Returns UseDeferredTask<Profile[], UnspecifiedError, ProfilesManagedArgs>

    Example

    const { called, data, error, loading, execute } = useLazyProfilesManaged();

    const callback = async () => {
    const result = await execute({
    for: '0x1234567890123456789012345678901234567890',
    });

    if (result.isFailure()) {
    toast.error(result.error.message);
    return;
    }

    const profiles = result.value;

    // do something with the profiles
    }
    • Defined in packages/react/src/wallet/useLazyProfilesManaged.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