You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
TP_ReactNative/service/AsyncStorage.tsx

17 lines
510 B

import { Card } from "../models/Card";
import AsyncStorage from "@react-native-async-storage/async-storage";
export class AsyncStorageCard{
static AddCardStorage(name : string, cards : Card[]){
const storeFavoriteNounours = async (cards : Card[]) => {
try {
const jsonCard = JSON.stringify(cards)
await AsyncStorage.setItem(name, jsonCard);
} catch (e) {
console.log("An error occurred", e);
}
}
}
}