useUserProvider
Introduction
The useUserProvider
hook provides you with the current logged in user data. It is used at the core of the SDK, to provide the user object.
Property | Type | Description |
---|---|---|
lmChatUser | null | Member | The current chat user, or null if not available. |
lmChatUserMemberState | number | null | The membership state of the chat user, or null . |
logoutUser | () => void | Function to log out the current user. |
lmChatUserCurrentCommunity | Community | null | The current community the user belongs to, or null . |
userNotLoadedErrorState | boolean | Indicates whether there was an error loading the user. |
Reference
For reference checkout this file