【发布时间】:2019-06-24 20:57:06
【问题描述】:
*// Creating An Array
const someArray = [1,2,3,4];
return AsyncStorage.setItem('somekey', JSON.stringify(someArray))
.then(json => console.log('success!'))
.catch(error => console.log('error!'));
//Reading An Array
return AsyncStorage.getItem('somekey')
.then(req => JSON.parse(req))
.then(json => console.log(json))
.catch(error => console.log('error!'));
*
如何更新数组的特定索引并删除索引
例如,新数组应该是 {1,A,3}
【问题讨论】:
标签: reactjs react-native async-await react-native-android react-native-ios