如何从 RKStorages 中的catalystLocalStorage 中删除persist:storage? 反应原生

问题描述

根据我的理解,RKStorage 是 React Native 的 AsyncStorage 的本地备份,现在我想在注销时清除存储,但似乎没有反映。

首先,我使用

检索存储在手机中的数据库
adb -d shell "run-as com.app.app cp /data/data/com.app.app/databases/RKStorage /sdcard/RKStorage" && adb pull /sdcard/RkStorage

我在用户登录时拉取它,检查数据,然后注销并再次拉取数据库。数据似乎没有变化。

enter image description here

到目前为止,这是在注销期间调用代码

const clearasyncStorage = async() => {
  const keys = await AsyncStorage.getAllKeys();
  await AsyncStorage.multiRemove(keys);
  AsyncStorage.getAllKeys().then(keys => AsyncStorage.multiRemove(keys))
  await AsyncStorage.setItem("persist:storage",JSON.stringify(''));
  await AsyncStorage.removeItem("persist:storage");
  await AsyncStorage.clear();

  const persistor = persistStore(store);
  await persistor.flush();
  await persistor.flush();
  await persistor.purge();
  await persistor.purge();
  setTimeout(() => persistor.purge(),200)
  persistor.purge().then(() => {return persistor.flush()}).then(() => {persistor.pause()})
  console.log(persistor)}));
  }

关于如何/我应该清除哪一个的任何想法?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)