componentWillReceiveProps(props) {
    if (!props.isUpdating) {
      if (props.isLoggedIn) {
        LocalStorage.save('password', this.state.password)

        LocalStorage.save('user', JSON.stringify(props.isLoggedIn)).then(() => {
          this.props.actions.routes.pop()
        })
      } else {
        console.log("Failed to log in.")
        // AlertIOS.alert("Failed to log in.")
      }
    }
  }
/**
   * Updates local storage after a user has logged in successfully.
   *
   * @return {void}
   */
Updates local storage after a user has logged in successfully.
@return {void}
Updates local storage after a user has logged in successfully . @return { void }
componentWillReceiveProps(props) {
    if (!props.isUpdating) {
      if (props.isLoggedIn) {
        LocalStorage.save('password', this.state.password)
        LocalStorage.save('user', JSON.stringify(props.isLoggedIn)).then(() => {
          this.props.actions.routes.pop()
        })
      } else {
        console.log("Failed to log in.")
      }
    }
  }
componentWillReceiveProps ( props ) { if ( ! props . isUpdating ) { if ( props . isLoggedIn ) { LocalStorage . save ( 'password' , this . state . password ) LocalStorage . save ( 'user' , JSON . stringify ( props . isLoggedIn ) ) . then ( ( ) => { this . props . actions . routes . pop ( ) } ) } else { console . log ( "Failed to log in." ) } } }
Updates local storage after a user has logged in successfully.
Updates local storage after a user has logged in successfully .
// AlertIOS.alert("Failed to log in.")