Hook to set the display name of the current user in a stream.
Imports
import { useSetDisplayName } from '@towns-protocol/react-sdk'
Definition
function useSetDisplayName(
streamId: string,
config?: ActionConfig<Myself["setDisplayName"]>,
): {
data: void | undefined;
error: Error | undefined;
isPending: boolean;
isSuccess: boolean;
isError: boolean;
setDisplayName: (displayName: string) => Promise<void>;
}
Source: useSetDisplayName
Parameters
streamId
The id of the stream to set the display name of.
config
- Type:
ActionConfig<Myself["setDisplayName"]>
- Optional
Configuration options for the action.
Return Type
The setDisplayName
action and its loading state.
{
data: void | undefined;
error: Error | undefined;
isPending: boolean;
isSuccess: boolean;
isError: boolean;
setDisplayName: (displayName: string) => Promise<void>;
}