Hook to get the data of the current user in a stream.

Imports

import { useMyMember } from '@river-build/react-sdk'

Definition

function useMyMember(
  streamId: string,
  config?: ObservableConfig.FromObservable<Member>,
): {
    id: string;
    userId: string;
    streamId: string;
    initialized: boolean;
    username: string;
    isUsernameConfirmed: boolean;
    isUsernameEncrypted: boolean;
    displayName: string;
    isDisplayNameEncrypted?: boolean | undefined;
    ensAddress?: string | undefined;
    nft?: NftModel | undefined;
    membership?: MembershipOp | undefined;
}

Source: useMyMember

Parameters

streamId

  • Type: string

The id of the stream to get the current user of.

config

  • Type: ObservableConfig.FromObservable<Member>
  • Optional

Configuration options for the observable.

Return Type

The MemberModel of the current user.

{
    id: string;
    userId: string;
    streamId: string;
    initialized: boolean;
    username: string;
    isUsernameConfirmed: boolean;
    isUsernameEncrypted: boolean;
    displayName: string;
    isDisplayNameEncrypted?: boolean | undefined;
    ensAddress?: string | undefined;
    nft?: NftModel | undefined;
    membership?: MembershipOp | undefined;
}