Skip to content

Instantly share code, notes, and snippets.

// React Native component
const value = {
name: "Chimezie",
job: "Software Developer"
};
const storeUser = async () => {
try {
await AsyncStorage.setItem("user", JSON.stringify(value));
setItem()
getItem()
mergeItem()
removeItem()
multiGet()
clear()
// React Native component
import AsyncStorage from '@react-native-async-storage/async-storage';
# using npm
npm install @react-native-async-storage/async-storage
# using Yarn
yarn add @react-native-async-storage/async-storage
# using Expo CLI
expo install @react-native-async-storage/async-storage
// storing data
const storeUser = async (value) => {
try {
await AsynStorage.setItem("user", JSON.stringify(value));
} catch (error) {
console.log(error);
}
};
// getting data
@ilkay-alti
ilkay-alti / cloudSettings
Created August 25, 2021 09:45 — forked from SelmanKahya/cloudSettings
VSCode settings
{"lastUpload":"2020-03-22T04:20:15.321Z","extensionVersion":"v3.4.3"}