Untitled
unknown
plain_text
a year ago
1.0 kB
7
Indexable
const onLogout = () => { // AsyncStorage.clear().then(response => { fb .auth() .signOut() .then(async() => { let keys = [ 'fcmToken', 'userDetails', 'language', 'categoryData', ]; await AsyncStorage.multiRemove(keys, err => { // keys k1 & k2 removed, if they existed // do most stuff after removal (if you want) }); // AsyncStorage.getAllKeys().then((key: any) => { // console.log('key', key); // if (Platform.OS === 'ios') { // key.forEach((item: string) => { // if (item !== 'resourcesData') { // AsyncStorage.removeItem(item); // } // }); // } else { // if (key !== 'resourcesData') { // AsyncStorage.removeItem(key); // } // } navigation.dispatch( CommonActions.reset({ index: 0, routes: [{name: Screens.HOME}], }), ) }); // }); // }); };
Editor is loading...
Leave a Comment