Core components play a crucial role in UIKit for React.
Property name | Type | Description |
---|---|---|
maxFileSize | Number | The maxFileSize parameter is responsible for the size of files that can be used as attachments in messages. This value depends on the type of your account and affects the duration of the audio message. By default, it does not exceed 10 MB. |
accountData | Object | Сontains information about SDK initialization settings, such as appId, accountKey, authKey, authSecret, and sessionToken. (Usually matching the credentials section in the settings file)The appId and accountKey parameters are mandatory.While the authKey and authSecret parameters are filled only when storing data in the app. If the initialization occurs on the server using a sessionToken, the authKey and authSecret parameters remain empty. It’s important to note that the accountData structure always includes all fields but fills only the necessary ones./type AccountData = {appId: number;accountKey: string;authSecret?: string;authKey?: string;sessionToken?: string;}; / |
loginData | Object | Not required field. It contains data about the logged-in user (login and password, which can be empty). If this structure is used and has changed, it triggers the relogin flow. |
Property name | Type | Description |
---|---|---|
storage | QBDataStorage | This property holds an object of type QBDataStorage, representing some data storage specific to the QBDataContext.The QBDataStorage structure is part of a project implementing the MVVM pattern and provides abstractions for managing various data sources and interacting with business logic. |
InitParams | InitParams | This property holds an object of type InitParams, which likely contains initialization parameters required for the QBDataContext./export type InitParams = {maxFileSize: number;accountData: AccountData;qbConfig?: QBConfig;loginData?: LoginData;} ; / |
method name | description |
---|---|
updateQBInitParams | This method allows updating the InitParams property of the QBDataContext with a new value of type InitParams. |
release | This method is intended to perform some cleanup or resource deallocation when it’s called. |
authorize | This method is an asynchronous function that takes an object of type AuthorizationData as an argument. It is likely used to handle authorization and authentication processes related to the QBDataContext. |
setSubscribeOnSessionExpiredListener | This method sets a listener for handling a session expiration event. It takes a callback function of type CallBackFunction as an argument |
Property name | Type | Description |
---|---|---|
theme | UiKitTheme | The custom or default UIKit theme is used to style all the inner components. link |
dialogsView | React Node Element (React.ReactNode) | The components responsible for creating the layout of the dialogs list and handling its functionality. Usually, this is the DialogsComponent component from our UIKit, which serves as the View part of the MVVM pattern. |
dialogMessagesView | React Node Element (React.ReactNode) | The components responsible for creating the layout of the selected dialog’s messages list and handling its functionality - what we call the chat. Usually, this is the MessagesView component from our UIKit, which serves as the View part of the MVVM pattern. |
dialogInfoView | React Node Element (React.ReactNode) | The components responsible for creating the layout of the selected dialog’s information - changing the name, adding or removing participants from the dialog. Usually, this is the DialogInformation component from our UIKit, which serves as the View part of the MVVM pattern. |