@cometchat/chat-sdk-react-native

中文文档
4.2.0发布于 2026/11/02SEE LICENSE IN LICENSE.mdTypeScriptCommonJS零依赖近 30 天下载 1.8万

A complete chat solution.

原始使用文档
文档目录3 节
  1. Prerequisites
  2. Getting Started
  3. Help and Support

CometChat

CometChat SDK for React Native

The CometChat SDK is a robust toolkit that developers can utilize to swiftly incorporate a reliable and fully-featured chat functionality into an existing or new application. It removes the complexity of building a chat infrastructure from scratch, thus accelerating the development process and reducing time to market.

Prerequisites

Getting Started

To set up React Native SDK and utilize CometChat for your chat and calls functionality, you'll need to follow these steps:

  • Register at the CometChat Dashboard to create an account.
  • After registering, log into your CometChat account and create a new app. Once created, CometChat will generate an Auth Key and App ID for you. Keep these credentials secure as you'll need them later.
  • Check the key concepts to understand the basic components of CometChat.
  • Refer to the Integration Steps in our documentation to integrate the SDK into your app.

Help and Support

For issues running the project or integrating with our SDK, consult our documentation or create a support ticket or seek real-time support via the CometChat Dashboard.

版本与发布记录

@cometchat/chat-sdk-react-native 共发布 35 个版本,首次发布于 2023/08/07;过去 12 个月发布了 16 个版本。

版本发布日期距今
4.2.0latest2026/11/027 天前
4.1.02026/09/072 个月前
4.0.292026/08/272 个月前
4.0.282026/08/063 个月前
4.0.272026/07/243 个月前
4.0.262026/06/244 个月前

其他发布通道:next → 4.0.19。

关于 @cometchat/chat-sdk-react-native 的常见问题

@cometchat/chat-sdk-react-native 是什么?

A complete chat solution.

如何安装 @cometchat/chat-sdk-react-native?

在项目目录运行 npm install @cometchat/chat-sdk-react-native,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(*)、react-native(*)、@react-native-async-storage/async-storage(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@cometchat/chat-sdk-react-native 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@cometchat/chat-sdk-react-native 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@cometchat/chat-sdk-react-native 可以商用吗?

@cometchat/chat-sdk-react-native 使用 SEE LICENSE IN LICENSE.md 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@cometchat/chat-sdk-react-native 的下载量有多少?

根据 npm 官方下载统计,@cometchat/chat-sdk-react-native 在 2026/10/11 – 2026/11/09 这 30 天内被下载 17,567 次,日均约 586 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cometchat/chat-sdk-react-native 还在维护吗?

最新版本 4.2.0 发布于 2026/11/02(7 天前);至今共发布 35 个版本,其中过去 12 个月发布了 16 个;首次发布于 2023/08/07。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。