API
useMember
Learn
- Introduction
- River Smart Contracts
- River Messaging Protocol
- River DAO
- RVR Token
- Frequently Asked Questions
Run
- Introduction
- Node Operator Tutorials
- Run Tutorials
- Resources
React SDK
- Getting Started
- API
- connectRiver
- connectRiverWithBearerToken
- getRoom
- RiverSyncProvider
- signAndConnect
- useAdminRedact
- useAgentConnection
- useChannel
- useCreateChannel
- useCreateDm
- useCreateGdm
- useCreateSpace
- useDm
- useGdm
- useJoinSpace
- useMember
- useMemberList
- useMyMember
- useObservable
- useReactions
- useRedact
- useRiver
- useRiverAuthStatus
- useScrollback
- useSendMessage
- useSendReaction
- useSetDisplayName
- useSetEnsAddress
- useSetNft
- useSetUsername
- useSpace
- useSyncAgent
- useThreads
- useTimeline
- useUserDms
- useUserGdms
- useUserSpaces
API
useMember
Hook to get data from a specific member of a Space, GDM, Channel, or DM.
Imports
import { useMember } from '@river-build/react-sdk'
Definition
function useMember(
props: {
streamId: string;
userId: string;
},
config?: ObservableConfig.FromObservable<Member>,
): {
error: Error | undefined;
status: "error" | "loading" | "loaded";
isLoading: boolean;
isError: boolean;
isLoaded: boolean;
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;
} | {
error: Error | undefined;
status: "error" | "loading" | "loaded";
isLoading: boolean;
isError: boolean;
isLoaded: boolean;
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;
} | {
error: Error | undefined;
status: "error" | "loading" | "loaded";
isLoading: boolean;
isError: boolean;
isLoaded: boolean;
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: useMember
Parameters
props
- Type:
{ streamId: string; userId: string; }
The streamId and userId of the member to get data from.
config
- Type:
ObservableConfig.FromObservable<Member>
- Optional
Configuration options for the observable.
Return Type
The Member data.
{
error: Error | undefined;
status: "error" | "loading" | "loaded";
isLoading: boolean;
isError: boolean;
isLoaded: boolean;
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;
} | {
error: Error | undefined;
status: "error" | "loading" | "loaded";
isLoading: boolean;
isError: boolean;
isLoaded: boolean;
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;
} | {
error: Error | undefined;
status: "error" | "loading" | "loaded";
isLoading: boolean;
isError: boolean;
isLoaded: boolean;
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;
}
Was this page helpful?