api/index.js
// saveDeckTitle: take in a single title argument and add it to the decks and return the saved deck.
take in a single title argument and add it to the decks and return the saved deck.
take in a single title argument and add it to the decks and return the saved deck .
function saveDeck(title) {
    const id = uuid();
    const newDeck = {
        [id]: {
            id,
            title,
            questions: [],
        }
    };
    return AsyncStorage.mergeItem(DECKS_STORAGE_KEY, JSON.stringify(newDeck))
        .then(() => newDeck);
}
function saveDeck ( title ) { const id = uuid ( ) ; const newDeck = { [ id ] : { id , title , questions : [ ] , } } ; return AsyncStorage . mergeItem ( DECKS_STORAGE_KEY , JSON . stringify ( newDeck ) ) . then ( ( ) => newDeck ) ; }
saveDeckTitle: take in a single title argument and add it to the decks and return the saved deck.
saveDeckTitle : take in a single title argument and add it to the decks and return the saved deck .