Skip to content

Instantly share code, notes, and snippets.

@warodri-sendbird
Created September 2, 2021 15:11
Show Gist options
  • Save warodri-sendbird/bff4a3458cb6be6de00fb5305685e44c to your computer and use it in GitHub Desktop.
Save warodri-sendbird/bff4a3458cb6be6de00fb5305685e44c to your computer and use it in GitHub Desktop.
useEffect(() => {
AsyncStorage.getItem(savedUserKey)
.then(user => {
if (user) {
setCurrentUser(JSON.parse(user));
}
setInitialized(true);
return handleNotificationAction(navigation, sendbird, currentUser, 'lobby');
})
.catch(err => console.error(err));
}, []);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment