Created
September 29, 2022 23:34
-
-
Save ilkay-alti/c8bc4ee03f55b9ed5f04e2ba5b18a42b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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