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

2. Update Initialization

Option A: Declarative (recommended) Replace manual init() + login() with CometChatProvider:
v6
v7
Option B: Manual (same as v6) You can still use CometChatUIKit.init() + login() and compose individual providers. See CometChatProvider — Individual Providers.

3. Update CSS Import

v6
v7
The CSS variables are the same — just the import mechanism changed.

4. Replace DataSource/Decorator with Plugins

v6
v7
See Plugins Overview for the full guide.

5. Replace RxJS Event Subscriptions

v6
v7
See Event System for the full event catalog.

6. Update Component Props

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

7. 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:

8. Enable Calling (If Used)

Calling is now opt-in:
v7
Without callingEnabled, call buttons are hidden and the Calls SDK is not loaded.

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

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) => { ... })
  • 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.

Removed Concepts


Next Steps

Property Changes

Full prop-by-prop migration reference for every component

CometChatProvider

New declarative setup with both approaches explained

Plugins

The new plugin system that replaces DataSource

Event System

Unified event bus replacing RxJS Subjects