title: Input state not binding onChange on first click
body: <p>I have declared a state called account_type. I have created an onChange event which changes the value of the state upon clicking the div.  </p>
  
  <pre><code>&lt;div
            className="price-plan"
            value="star"
            onClick={() =&gt; this.setPlan("star")}
          &gt;
  </code></pre>
  
  <p>The issue is that the account_type state does not get updated the first time I click on the div. It only gets updated when I click on it twice. Is there a way to update the state just by clicking the div. Here's an excerpt from my code showing what I am trying to do</p>
  
  <pre><code>
      let isRedirect = false;
  
      class PricePlan extends React.Component {
        constructor(props) {
          super(props);
          this.state = {
            account_type: "",
            renderRedirect: false
          };
  
          this.handleChange = this.handleChange.bind(this);
        }
  
        // Handle fields change
        handleChange = input =&gt; e =&gt; {
          this.setState({ [input]: e.target.value });
        };
  
  
        setPlan(plan) {
          this.setState({
            account_type: plan
          });
          console.log(this.state.account_type);
          // if (this.state.account_type !== undefined) {
          //   isRedirect = true;
          // }
        }
  
        render() {
          if (isRedirect) {
            return (
              &lt;Redirect
                to={{
                  pathname: "/sign-up",
                  state: { step: 2, account_type: this.state.account_type }
                }}
              /&gt;
            );
          }
  
          return (
              &lt;div
                className="price-plan"
                value="star"
                onClick={() =&gt; this.setPlan("star")}
              &gt;
                &lt;h3&gt;{this.props.planName}&lt;/h3&gt;
                &lt;div className="mute price-row"&gt;Name&lt;/div&gt;
                &lt;p className="price"&gt;Price&lt;/p&gt;
                &lt;span className="billed-frequency"&gt;Cycle&lt;/span&gt;
              &lt;/div&gt;
  
          );
        }
      }
  
  </code></pre>