Advertisement
Guest User

Untitled

a guest
Feb 17th, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. componentDidMount() {
  2.     this.setLocalConfigs();
  3. }
  4.  
  5. async setLocalConfigs() {
  6.     const response = await AsyncStorage.getItem('@LOGIN_OPTIONS');
  7.  
  8.     if (response) {
  9.         const localConfigs = JSON.parse(response);
  10.         this.setRememberUser(...localConfigs);
  11.     }
  12. }
  13.  
  14. setRememberUser(loginOpcaoLembrarUsuario, loginUsuario) {
  15.     const { setFieldValue } = this.props;
  16.  
  17.     setFieldValue('opcaoLembrarUsuario', loginOpcaoLembrarUsuario);
  18.     loginOpcaoLembrarUsuario && setFieldValue('usuario', loginUsuario);    
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement