Skip to content

Instantly share code, notes, and snippets.

@ilkay-alti
Created September 29, 2022 23:34
Show Gist options
  • Select an option

  • Save ilkay-alti/c8bc4ee03f55b9ed5f04e2ba5b18a42b to your computer and use it in GitHub Desktop.

Select an option

Save ilkay-alti/c8bc4ee03f55b9ed5f04e2ba5b18a42b to your computer and use it in GitHub Desktop.
// storing data
const storeUser = async (value) => {
try {
await AsynStorage.setItem("user", JSON.stringify(value));
} catch (error) {
console.log(error);
}
};
// getting data
const getUser = async () => {
try {
const userData = JSON.parse(await AsynStorage.getItem("user"))
} catch (error) {
console.log(error);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment