title: is it possible to set multiple state variables in reactjs?
body: <p>It is given simple react chat container, which successully grabs data with <code>LoadConversationInformation</code> function as following</p>
  
  <pre><code>var ConversationContainer = React.createClass({
      LoadConversationInformation: function () {
          jQuery.ajax({
              url: this.props.getMessageUrl,
              dataType: 'json',
              cache: false,
              success: function (data) {
                 this.setState({data: data});
              }.bind(this),
              error: function (xhr, status, err) {
                  console.error(this.props.url, status, err.toString());
              }.bind(this)
          });
      },
      ...
      render: function () {
          var Chat = this.state.data.map(function (message) {
              return (
                  &lt;MessageContainer message={message} key={message.id}/&gt;
              );
          });
          return (
              &lt;div&gt;
                  {Chat}
                  &lt;MessageForm onMessageSubmit={this.handleMessageSubmit}/&gt;
              &lt;/div&gt;
          );
      }
  });
  </code></pre>
  
  <p>It is required to check if in first element of <code>data</code> exists some attribute, if so, add it to separate state variable, like this:</p>
  
  <pre><code>     ...
          success: function (data) {
              if ('hasContactRequest' in data[0]) {
                  this.setState({
                      data: data,
                      hasContactRequest: data[0].hasContactRequest
                  });
              }
              else {
                  this.setState({data: data});
              }
          }.bind(this),
          error: function (xhr, status, err) {
              console.error(this.props.url, status, err.toString());
          }.bind(this)
      ...
  </code></pre>
  
  <p>To make possible in <code>ConversationContainer</code> child check for it and render some element, if it is present, like this:</p>
  
  <pre><code>    var MessageContainer = React.createClass({
          render: function () {
              return (
                  &lt;li className={(this.props.message.type === 'sender') ? 'sender' : 'receiver'}&gt;
                      &lt;MessageImage /&gt;
                      &lt;MessageDate date={this.props.message.date}/&gt;
                      &lt;MessageText text={this.props.message.text}/&gt;
                      {(this.state.hasContactRequest ? &lt;MessageSendContacts/&gt; : null)}
                  &lt;/li&gt;
              );
          }
      });
  </code></pre>
  
  <p>Generally chat is working but i cant get no luck of adding this additional state variable, and access it like <code>this.state.hasContactRequest</code>
  got:
  <code>Uncaught TypeError: Cannot read property 'hasContactRequest' of null</code></p>
  
  <p>How to properly do it ?</p>