React Creating a group channel with createChannelWithUserIds

[Problem/Question]
I have this issue, where i want to create a group channel from some user Id’s automatically when the chat load. So it happens that i use createChannelWithUserIds, from the console log message, it shows that the group is created, but i can’t find them on the chat UI.


[UIKit Version]
“sendbird-uikit”: “^2.7.2”

[Reproduction Steps]
const userSets = [

[
{ id: ‘8697e497-5327-4f3c-9094-66e561459168’, name: ‘User 1’, firstName:‘user1’, lastName: ‘user1’ },
{ id: ‘4b6212a5-4c6e-48bf-ab24-e628a3007461’, name: ‘User 2’, firstName:‘user2’, lastName: ‘user2’ },
],
[
{ id: ‘0e78eec5-24ee-4590-b6fe-8cc6737bc588’, name: ‘User 4’, firstName:‘user4’, lastName: ‘user4’ },
{ id: ‘e96ad6ad-c30e-4559-9446-c64c572d54bf’, name: ‘User 5’, firstName:‘user5’, lastName: ‘user5’ },
],
];

useEffect(() => {
createChannelsForUserSets(userSets);
}, [userSets]);

const createChannelsForUserSets = async (sets) => {
const sb = SendBird.getInstance();

for (const userSet of sets) {
const userIds = userSet.map(user => user.id);
const channelName = Channel for ${userSet.map(user => user.name).join(', ')};

sb.GroupChannel.createChannelWithUserIds(userIds, true, channelName, null, null, null, (channel, error) => {
  if (error) {
    console.error('Error creating channel:', error);
  } else {
    console.log('Channel created:', channel);
  }
});

}
};

return (




<SendBirdKit
appId=“C4B25229-A6F4-46A3-884C-D35FBC90A4A7”
userId={user?.id}
showSearchIcon
userListQuery={CustomUserPaginatedQueryFactory}
nickname={${user.firstName} ${user.lastName}}
profileUrl={user?.picture?.url}
colorSet={myColorSet}
/>

    </div>
  </SideBar>
</div>

)
}

[Frequency]
// How frequently is this issue occurring?

[Current impact]
// How is this currently impacting your implementation?