首页 > 解决方案 > 我们可以在同一个项目中使用两个 React Native 的异步存储吗?

问题描述

首先我尝试了一个 Async-storage data ,它正在工作。问题出在我以其他形式提供的其他异步存储数据上。它不起作用。有人可以帮我解决这个问题吗?

数据:-

    StoreImageData = async () => {
        const Obj = "save"
        test.push(Obj)
        Alert.alert(JSON.stringify(test))
        try {
          await AsyncStorage.setItem('@Store', JSON.stringify(test))
          this.props.navigation.navigate('CarView');
          Alert.alert('Saved', 'Successful');
        } catch (e) {
          // saving error
        }
      }

标签: react-nativeasyncstorage

解决方案


推荐阅读