@rongcloud/imkit-store
v1.2.1
Published
RongCloud IM UIKit Store
Readme
UNI IMKit Store
1 环境要求
- Node.js >= 18.0.0
- TypeScript >= 5.0.0
- MobX >= 6.0.0
2 安装
npm install @rongcloud/engine @rongcloud/imkit-store @rongcloud/imlib-next3 使用示例
import { RCKitStoreInstaller } from '@rongcloud/imkit-store';
import * as RongIMLib from '@rongcloud/imlib-next';
// imlib 初始化
RongIMLib.init({
appkey: <APPKEY>,
});
// Kit store 初始化
const store = RCKitStoreInstaller();
// 连接 IM
RongIMLib.connect(<TOKEN>).then((res) => {
const { code, data } = res;
});
// 获取会话列表
const { list, hasMore } = store.conversationStore.getConversations();