Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async function getStoredDatas(){
- try{
- return {
- user: await AsyncStorage.getItem('@Store:user'),
- password: await AsyncStorage.getItem('@Store:password')
- };
- }
- catch(e){
- console.log("error:" + e); // never triggered
- }
- }
- let a = getStoredDatas().then( (datas) => {
- console.log("then: " + datas.user); // never triggered also
- });
- console.log(a); // Promise with this content: {_40: 0, _65: 0, _55: null, _72: null}
Add Comment
Please, Sign In to add comment