Skip to main content

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

PropertyTypeDescriptionOptional
lmChatClientLMChatClientClient created for interaction with the data layer during Getting Started.
userNamestringUser name of the logged-in user.
userUniqueIdstringUUID of the logged-in user.
profileImageUrlstringProfile image URL of the logged-in user.
lmChatInterfaceanyObject 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>
);