title: React not changing Value of variable
body: <p>I try to learn React JS, however, I stumbled over a problem I can't solve. I try to use an API to get a value of something and show the value as a simple text, but the text is not updating even tho the Data gets correctly log in console.</p>
  <p>The Code of my App.js is</p>
  <pre><code>    import React, { Component } from &quot;react&quot;;
  import { Button } from &quot;@material-ui/core&quot;;
  import { Image } from &quot;react-bootstrap&quot;;
  import albedo from &quot;@albedo-link/intent/lib/albedo.intent&quot;;
  import albedologo from &quot;./albedo.png&quot;;
  
  class LogInWithAlbedo extends Component {
    constructor(props) {
      super(props);
      this.state = {
        value: null
      };
    }
    Albedo() {
      albedo.publicKey({}).then((res) =&gt; {
        const { intent, pubkey, signature, signed_message } = res;
        console.log({ intent, pubkey, signature, signed_message });
        this.setState((currentState) =&gt; {
          return { value: pubkey };
        });
      });
    }
    render() {
      const { pubkey } = this.state;
      return (
        &lt;div&gt;
          &lt;div&gt;
            &lt;Button
              style={{ width: &quot;207px&quot;, height: &quot;40px&quot; }}
              variant=&quot;contained&quot;
              color=&quot;default&quot;
              onClick={this.Albedo.bind(this)}
            &gt;
              Login With &lt;Image style={{ width: &quot;55px&quot; }} src={albedologo} /&gt;
            &lt;/Button&gt;
            &lt;h2&gt;It is {pubkey}.&lt;/h2&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      );
    }
  }
  
  export default LogInWithAlbedo;
  </code></pre>
  <p>You can also see it here:
  <a href="https://codesandbox.io/s/vigilant-star-ntqv7" rel="nofollow noreferrer">https://codesandbox.io/s/vigilant-star-ntqv7</a></p>