title: Reactjs API error 'TypeError: fetch(...).then(...).then(...).done is not a function'
body: <p>loggingIn() is my onClick listener.   </p>
  
  <pre><code>loggingIn(){
              fetch("http://sampleurl.com", {
                  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((responseData) =&gt; {
                  console.log(responseData);
              if (responseData.response === 1) {
                alert("Success");
  
              } else {
                  alert("Username or password is incorrect");
              }
  
          })
          .done();
      }
  </code></pre>
  
  <p>Does anybody know why it gives me an error?. When I use this code to react native it works just fine but when I integrate it in reactjs it gives me this error </p>
  
  <pre><code>`TypeError: fetch(...).then(...).then(...).done is not a function`
  </code></pre>