反应本机异步存储
React Native Async Storage
import AsyncStorage from '@react-native-async-storage/async-storage';
我正在使用上面的包。 2小时前它工作正常。但突然停止 working.no 出现问题或警告。
我在我的应用程序中使用 Aysncstorge 来保存一个值。它工作正常。她是我的代号。
const Authorize = dispatch => async () =>{
console.log("calledddd")
try{
let islogin = await AsyncStorage.getItem('islogin')
console.log(islogin)
}catch(error){
console.log(error)
}
console.log("called last")
}
我也这样试过
AsyncStorage.getItem('islogin').then((islogin) => {
console.log(islogin)
}).catch((error) => {
console.log(error)
})
从以下包中使用它:
@react-native-community/async-storage
尽情享受吧!!!
import AsyncStorage from '@react-native-async-storage/async-storage';
我正在使用上面的包。 2小时前它工作正常。但突然停止 working.no 出现问题或警告。
我在我的应用程序中使用 Aysncstorge 来保存一个值。它工作正常。她是我的代号。
const Authorize = dispatch => async () =>{
console.log("calledddd")
try{
let islogin = await AsyncStorage.getItem('islogin')
console.log(islogin)
}catch(error){
console.log(error)
}
console.log("called last")
}
我也这样试过
AsyncStorage.getItem('islogin').then((islogin) => {
console.log(islogin)
}).catch((error) => {
console.log(error)
})
从以下包中使用它:
@react-native-community/async-storage
尽情享受吧!!!