_reactNativeChat.CometChat.createUser is not a function

I am using the below version of comet chat

@cometchat-pro/react-native-chat”: “2.0.6”,

While creating a new user I am getting the attached error. The code I am using is given below:

let cometUser = new CometChat.User(user.uid);


CometChat.createUser(cometUser, config.authOnlyApiKey).then(
    user => {
        console.log("comet user created", user);
    },error => {
        console.log("error", error);

1 Like

Hello @arunnambissan,

Create User was added in v2.0.7. You can check the changelog here.
The latest version of the React Native SDK is 2.0.10. I would advise you to update to the latest version. I hope this helps.

Warm Regards,

CometChat Pro
Mayur Bhandari

1 Like

Ok. Thanks for the update.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.