Created
September 30, 2022 19:52
-
-
Save ilkay-alti/85c94112fdfa7fcbad0c1cdb8e86fa97 to your computer and use it in GitHub Desktop.
ReactNative.js
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
// React Native component | |
const getUser = async () => { | |
try { | |
const savedUser = await AsyncStorage.getItem("user"); | |
const currentUser = JSON.parse(savedUser); | |
console.log(currentUser); | |
} catch (error) { | |
console.log(error); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment