title: Using google sign in button with react
body: <p>I'm trying to use the google sign in in a react application.
  While using the sign in button as is outside the application itself works great, when using it within a custom SignIn component I can't get it to work as expected.
  When the user signs in, the button itself should execute a <code>data-onsuccess</code> method.
  The problem is that the execution never reaches that method even though the sign in works.</p>
  
  <p>I'm probably missing some react gotcha but I can't really find it. Any help? Find below the html that loads everything and the component itself.</p>
  
  <pre><code>&lt;head&gt;
      &lt;meta name="google-signin-scope" content="profile email"&gt;
      &lt;meta name="google-signin-client_id" content="1234-real-client-id.apps.googleusercontent.com"&gt;
      &lt;script src="https://apis.google.com/js/platform.js" async defer&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;!-- Here is where everything gets displayed --&gt;
      &lt;div id="app"&gt;&lt;/div&gt;
  
      &lt;!-- The file with the js code --&gt;
      &lt;script src="/js/main.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  
  
  var SignIn = React.createClass({
      onSignIn : function (google_user) {
          // I want this method to be executed
      },
  
      render : function() {
          return (
              &lt;div className="g-signin2" data-onsuccess={this.onSignIn} data-theme="dark" /&gt;
          );
      }
  });
  </code></pre>
  
  <p>Notice that I didn't paste here irrelevant code ;)</p>