How to use the @cometchat-pro/react-native-chat.CometChat.getLoggedinUser function in @cometchat-pro/react-native-chat

To help you get started, we’ve selected a few @cometchat-pro/react-native-chat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cometchat-pro-samples / react-native-chat-app / chatApp / src / GroupChatScreen.js View on Github external
getLoggedInUser(){
        var user = CometChat.getLoggedinUser().then(user=>{
            console.log("user details:", {user});
            myUserID = user.uid;
          },error=>{
            console.log("error getting details:", {error})
          });
    }
github cometchat-pro-samples / react-native-chat-app / chatApp / src / LoginScreen.js View on Github external
() => {
                CometChat.getLoggedinUser().then(
                    user => {
                        if(user !== null){
                            this.props.navigation.navigate('Home');
                        }
                    }
                );
            }, error => {
                console.log("Initialization failed with error:", error);