Browse SDKs · React Native
Platform
SDKsReact Native

Get joined group list by page

Query groups joined by the current account with pagination using the OpenIM React Native SDK.

Copy

Query the list of groups joined by the current login account by page:

const groups = await OpenIMSDK.getJoinedGroupListPage({
  offset: 0,
  count: 50,
});

Parameters

ParameterTypeRequiredDescription
offsetnumberYesPagination offset; pass 0 for the first page.
countnumberYesNumber 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.