title: this._loadInitialState(...).done is not a function
body: <p>I am just beginning a week on react native, and i am following a youtube tutorial. But i am getting an error on <code>this._loadInitialState(...).done is not a function</code>. Why is that? In the code of the tutorial it works for him? I put some arrows inside  the code which line it is where i am getting the error.</p>
  
  <p>I tried to google but there is not much information about it.</p>
  
  <pre><code>  constructor(props) {
      super(props);
      this.state = {
        username: "",
        password: ""
      };
    }
  
    componentDidMount() {
  this line error ---&gt;&gt;&gt;&gt;&gt;&gt;    this._loadInitialState().done();
    }
  
    _loadInitialState = async () =&gt; {
      var value = await AsyncStorage.getItem("user");
      if (value !== null) {
        this.props.navigation.navigate("Profile");
      }
    };
  }
  
  </code></pre>
  
  <p>Thank you for your help guy's, i appreciate it.</p>
  
  <p><b>*EDIT (another .done() function that causes error)</b></p>
  
  <pre><code>login = () =&gt; {
      fetch("http://192.168.1.16:19006/", {
        method: "POST",
        headers: {
          Accept: "application/json",
          "Content-Type": "application/json"
        },
        body: JSON.stringify({
          username: this.state.username,
          password: this.state.password
        })
      })
        .then(response =&gt; response.json())
        .then(res =&gt; {
          alert(res.message);
  
          if (res.success === true) {
            AsyncStorage.setItem("user", res.user);
            this.props.navigation.navigate("Profile");
          } else {
            alert(res.message);
          }
  this line -&gt;&gt;&gt;&gt; }).done();
    };
  } 
  </code></pre>
  
  <p>It's on this line: >> }).done();</p>
  
  <p>The error is : TypeError: fetch(...).then(...).then(...).done is not a function</p>