Skip to main content
Quick Reference
# Install v4 Chat SDK
npm i @cometchat/chat-sdk-react-native

# Install v4 Calls SDK
npm i @cometchat/calls-sdk-react-native
// Updated imports
import { CometChat } from '@cometchat/chat-sdk-react-native';
import { CometChatCalls } from '@cometchat/calls-sdk-react-native';
Upgrading from v3.x to v4 is fairly simple. Below are the major changes that are released as a part of CometChat v4: Please follow the setup instructions to upgrade to the latest V4 version.

Dependency Change

Chat SDK

npm i @cometchat/chat-sdk-react-native

Calls SDK

npm i @cometchat/calls-sdk-react-native

Change The Import Statements

Change the import statements all around the project.

Chat SDK

import {CometChat} from '@cometchat/chat-sdk-react-native'; 

Calls SDK

import {CometChatCalls} from '@cometchat/calls-sdk-react-native';
  • Update both the Chat SDK and Calls SDK together to avoid version incompatibilities
  • After updating dependencies, do a clean build (npx react-native start --reset-cache) to clear any cached modules
  • Search your entire project for old import paths (@cometchat-pro/react-native-chat) and replace them with the new v4 paths
  • Test all listeners and callbacks after upgrading — some callback signatures may have changed between v3 and v4
  • Module not found errors: Ensure you’ve removed the old v3 packages (@cometchat-pro/react-native-chat) and installed the new v4 packages.
  • Duplicate module errors: Run npm dedupe or delete node_modules and reinstall to resolve conflicting versions.
  • iOS build fails after upgrade: Run pod install --repo-update in the ios/ directory to update native dependencies.
  • Android build fails: Clean the build with ./gradlew clean in the android/ directory and rebuild.

Next Steps