SDKsReact Native
Get joined group list by page
Query groups joined by the current account with pagination using the OpenIM React Native SDK.
Query the list of groups joined by the current login account by page:
const groups = await OpenIMSDK.getJoinedGroupListPage({
offset: 0,
count: 50,
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
offset | number | Yes | Pagination offset; pass 0 for the first page. |
count | number | Yes | Number of group records to retrieve in this batch. |
To retrieve subsequent pages, set offset to the cumulative count of groups already fetched.
Return value
A resolved Promise returns GroupItem[] for the current page. If the returned array contains fewer items than count, all joined groups have been retrieved. Reconcile and maintain your group list using groupID as the unique key. For field definitions, see Group overview.
Was this page helpful?