Skip to main content

What’s New in v7

v7 is a ground-up rewrite that replaces global singletons with React-native patterns while keeping most component props compatible. The core shifts:

Step-by-Step Migration Checklist

1. Update Dependencies

dompurify and @cometchat/cards-react are regular dependencies of the UI Kit, so npm pulls them in automatically. They are not peer dependencies and do not belong in your package.json.Bump your SDK first. 7.2.x declares @cometchat/chat-sdk-javascript ^4.2.0, so staying on a 4.1.x pin fails with ERESOLVE — ^4 is not sufficient. Installing ^4.2.0 is safe on every v7 release, including 7.0.x and 7.1.x, whose ranges it also satisfies.
Delete your v6 stylesheet import. v6 required you to import the base stylesheet yourself:
v6 — remove this
v7 injects its own stylesheet when you import any component, so no CSS import is needed. The package does still expose a @cometchat/chat-uikit-react/styles subpath for compatibility, but importing it is redundant. Remove the import rather than switching it over.

2. Update Initialization

The initialization pattern is nearly identical between v6 and v7. The only addition in v7 is wrapping your app in CometChatProvider:
v6
v7

Checking for an existing session

The v6 init snippet used getLoggedinUser() to skip re-login when a session already existed, so most v6 apps carry one of these two calls. Both changed shape in v7:
CometChatUIKit.getLoggedInUser() is synchronous in v7 and returns CometChat.User | null directly — not a Promise. Note the capital I: v6’s async method was spelled getLoggedinUser(), and that spelling no longer exists on CometChatUIKit, so v6 code carried over unchanged throws a TypeError at runtime (… getLoggedinUser is not a function; the exact prefix depends on your bundler). TypeScript flags it at compile time.Await the SDK’s CometChat.getLoggedinUser() when you need the asynchronous form, or drop the await and call CometChatUIKit.getLoggedInUser() once login has completed. CometChatUIKitLoginListener no longer exists in v7.
CometChatUIKit.init() also resolves with the existing user (or null), so a session check often collapses into the init call you already have:
v7 — init doubles as the session check

3. Replace DataSource/Decorator with Plugins

v6
v7
See Plugins Overview for the full guide.

4. Replace RxJS Event Subscriptions

v6
v7
See Event System for the full event catalog.

5. Update Component Props

Most component props are unchanged. Key patterns to watch for: For the full prop-by-prop reference, see Property Changes.

6. Update Theming (Minor)

CSS variables are the same between v6 and v7. The only change is how you set the theme:
v6
v7
Or use the useTheme() hook for runtime switching:

7. Enable Calling (If Used)

Calling is now opt-in. v6 turned it on by itself: once @cometchat/calls-sdk-javascript was installed, the UI Kit enabled calling during login and call buttons appeared. v7 only enables it when you ask, via UIKitSettingsBuilder:
v7
Without .setCallingEnabled(true), call buttons are hidden and the Calls SDK is not loaded. This is a silent change for a v6 app that had calling working: nothing errors, the call buttons simply stop appearing until you add the flag.

Architecture Changes

DataSource → Plugin System

v6 used a decorator pattern (DataSourceDecorator) to customize message rendering. v7 replaces this with a simpler plugin interface:
  • Each plugin owns one or more message types
  • Plugins provide renderBubble(), getOptions(), getLastMessagePreview()
  • Default plugins are included automatically
  • Custom plugins are passed via the plugins prop on CometChatProvider

RxJS Subjects → Unified Event Bus

v6 had separate RxJS Subject classes for each event category (CometChatMessageEvents, CometChatGroupEvents, CometChatCallEvents, etc.). v7 merges all events into a single typed pub/sub system:
  • Subscribe: useCometChatEvents((event) => { ... }, [deps]) — the deps array is required
  • Publish: const publish = usePublishEvent()
  • SDK events (from network) and UI events (from components) flow through the same bus

Flat API → Compound Components

v7 components support both flat API (same as v6) and compound composition:
Flat API (works same as v6)
Compound (new in v7)
The flat API is fully backward-compatible. Compound composition is optional for advanced customization.
One Conversations default did flip: showSearchBar defaulted to false in v6 and defaults to true in v7, so a v6 app that never set the prop gains a search bar after upgrading. Pass showSearchBar={false} to keep the v6 look. Note there is no hideSearch prop on CometChatConversations in either version — hideSearch belongs to CometChatUsers, CometChatGroups and CometChatGroupMembers.

Presentational Bubbles → Self-Extracting Bubbles

In v6, message bubble components (TextBubble, ImageBubble, etc.) were presentational — they received pre-extracted props like src, text, isSentByMe from the parent. The DataSource/plugin layer did the extraction and passed data down. In v7, bubble components are self-extracting — they accept the SDK message object as their primary input and derive rendering state internally (attachments, text, sender info, alignment). Some bubbles retain optional override props (e.g., text and isSentByMe on CometChatTextBubble), but the standard usage is to pass only message.
v6 — presentational (parent extracts data)
v7 — self-extracting (bubble handles it)
This applies to all message bubbles: CometChatTextBubble, CometChatImagesBubble, CometChatVideosBubble, CometChatAudiosBubble, CometChatVoiceNoteBubble, CometChatFilesBubble, CometChatPollBubble, CometChatStickerBubble, CometChatCallBubble, CometChatCollaborativeDocumentBubble, CometChatCollaborativeWhiteboardBubble, CometChatGroupActionBubble, and CometChatCallActionBubble.
In v7 the default rendering moves to the multi-attachment media bubbles: CometChatImageBubble → CometChatImagesBubble, CometChatVideoBubble → CometChatVideosBubble, CometChatFileBubble → CometChatFilesBubble, and CometChatAudioBubble → CometChatAudiosBubble (attached audio files) or CometChatVoiceNoteBubble (recorded voice notes). The singular CometChat*Bubble components still ship and can be used standalone — only the message list’s default routing changed.

Removed Concepts


Next Steps

Property Changes

Full prop-by-prop migration reference for every component

CometChatProvider

Provider setup with all props explained

Plugins

The new plugin system that replaces DataSource

Event System

Unified event bus replacing RxJS Subjects