shimohq / react-native-cookie

A cookie manager module for react-native
MIT License
93 stars 49 forks source link

Undefined is not an object (evaluating Cookiemanager.clearCookies) #13

Open parmeet9891 opened 6 years ago

parmeet9891 commented 6 years ago

When i click on logout button and press on 'Yes', it shows this error. I have also done 'react-native link react-native-cookie', but still shows this error.

Importing Files import InstagramLogin from 'react-native-instagram-login'; import Cookie from 'react-native-cookie';

Logout Code `toggleInstagram= () => { const {instagram}= this.state;

    if(instagram)
        Alert.alert(
        '',
        'Are you sure you want to remove Instagram account?',
        [
            {
                text: 'Yes', onPress: () => {
                  Cookie.clear().then(() => {
                    this.setState({ token: null, instagram:null, instagram_data:null })
                  })
            } },
            {text: 'No', style: 'cancel'}
        ]
    );

    else
        return this.refs.instagramLogin.show();
}`
asifhussainoyo commented 6 years ago

@parmeet9891 Did you get any solution for the above error??

Dhanraj-bidchat commented 5 years ago

Did you fixed it? My Configurations: "react": "16.8.3", "react-native": "0.58.6", "react-native-instagram-login": "1.1.1", "react-native-cookie": "0.2.0"

jtqtech commented 5 years ago

I am also having same problem