LMOverlayProvider
The LMOverlayProvider plays a crucial role in the Chat components as it serves as the top-level manager. It handles important tasks such as integrating the entire app with Redux, enabling users to interact with messages by long-pressing them over the underlying views, and more. To work effectively, LMOverlayProvider requires specific essential properties, which are outlined below.
Props Required
Property | Type | Description | Optional |
---|---|---|---|
lmChatClient | LMChatClient | Client created for interaction with the data layer during Getting Started. | |
userName | string | User name of the logged-in user. | |
userUniqueId | string | UUID of the logged-in user. | |
profileImageUrl | string | Profile image URL of the logged-in user. | |
lmChatInterface | any | Object of the class created by implementing callback classes. | ✔️ |
Code snippet
import { LMOverlayProvider } from "@likeminds.community/chat-rn-core";
return (
<LMOverlayProvider
lmChatClient={lmChatClient}
userName={userName}
userUniqueId={userUniqueId}
profileImageUrl={profileImageUrl}
lmChatInterface={lmChatInterface}
>
{/* Add navigation container */}
</LMOverlayProvider>
);