title: Multiple checkbox values handling with ReactJS
body: <p>I'm trying to learn ReactJS and creating a little chore list which adds the name of the chore and the days when the chore should be done.</p>
  
  <p>But I can't figure out how to get an array of the checked checkboxes when handling the submit of the form.</p>
  
  <p>What I'd like is to have an array of all checked values in my newChore.handleSubmit.</p>
  
  <pre><code>var NewChore = React.createClass({
      handleSubmit: function (e) {
          e.preventDefault();
          var name = this.refs.name.value;
          console.log(this.refs.test);
      },
      render: function () {
          return (
              &lt;form className="ChoreForm" onSubmit={this.handleSubmit}&gt;
                  &lt;div&gt;
                      &lt;label htmlFor="name"&gt;Naam&lt;/label&gt;
                      &lt;input type="text" ref="name" id="name" /&gt;
                  &lt;/div&gt;
                  &lt;div&gt;
                      &lt;Day number="1" name="Monday" ref="test" /&gt;
                      &lt;Day number="2" name="Tuesday" ref="test" /&gt;
                  &lt;/div&gt;
                  &lt;input type="submit" value="Opslaan" /&gt;
              &lt;/form&gt;
          );
      }
  });
  
  var Day = React.createClass({
      render: function () {
          return (&lt;div&gt;
              &lt;input type="checkbox" onChange={this.handleChange} ref="day_number" id="day_{this.props.number}" /&gt;&lt;label htmlFor="day_{this.props.number}"&gt;{this.props.name}&lt;/label&gt;
          &lt;/div&gt;);
      }
  });
  </code></pre>