1var myArray = ['one','two','three'];
2
3try {
4 await AsyncStorage.setItem('@MySuperStore:key', JSON.stringify(myArray));
5} catch (error) {
6 // Error saving data
7}
8
9try {
10 const myArray = await AsyncStorage.getItem('@MySuperStore:key');
11 if (myArray !== null) {
12 // We have data!!
13 console.log(JSON.parse(myArray));
14 }
15} catch (error) {
16 // Error retrieving data
17}
18