title: onChange function console.log is one character short
body: <p>I am trying to create password confirmation functionality in my form. However, while testing, my <code>console.logs</code> output values that are always one value short and I am not sure why this is occurring.</p>
  
  <pre><code>class SignUp extends React.Component {
      getInitialState() {
          return {
              initialPassword: "",
              confirmPassword: "",
              isMatchedPassword: true,
              isEmailInUse: false,
          }
      }
  
  
      checkAvailableEmail(event) {
          console.log("checkAvailableEmail");
          console.log(event.target.value);
      }
  
      confirmPassword(event) {
          console.log("confirmPassword");
          this.setState({
              confirmPassword: event.target.value
          })
  
          if (this.state.confirmPassword !== this.state.initialPassword) {
              console.log("Passwords DONT match");
              this.state.isMatchedPassword = false;
          } else {
              console.log("Passwords match");
              this.state.isMatchedPassword = true;
          }
  
          console.log("confirmPassword props");
          console.log(this.state);
  
      }
  
      setInitialPassword(event) {
          console.log("setInitialPassword");
          this.setState({
              initialPassword: event.target.value
          });
          console.log("setInitialPassword props");
          console.log(this.state);
  
      }
  
      render() {
          let hidden = "";
          Log.debug('Signup component props');
          Log.debug(this.props);
  
          return (
              &lt;div&gt;
                  &lt;form method="POST" action="/signup"&gt;
                      &lt;ul&gt;
                          &lt;li&gt;&lt;input id="firstName" name="first_name" placeholder="First name" type="text" required="required" /&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;input id="lastName" name="last_name" placeholder="Last name" type="text" required="required" /&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;input id="email" name="email" placeholder="Email" type="email" required="required" onBlur={ this.checkAvailableEmail }/&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;input id="password" name="password" placeholder="Password" type="password" required="required" onChange={ this.setInitialPassword}/&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;input id="confirmPassword" name="confirm_password" placeholder="Confirm Password" type="password" required="required" onChange={ this.confirmPassword } /&gt;&lt;/li&gt;
                          &lt;span id="confirmMessage" className={ hidden }&gt;Password does not match&lt;/span&gt;
                          &lt;input type="submit" value="Sign up" /&gt;
                          &lt;input type="reset" value="Cancel" /&gt;
                      &lt;/ul&gt;
                  &lt;/form&gt;
              &lt;/div&gt;
          );
      }
  };
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/y8zZs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y8zZs.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/uJyWQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uJyWQ.png" alt="enter image description here"></a></p>