What is the recommended pattern for doing a setState on a parent from a child component.
var Todos = React.createClass({
  getInitialState: function() {
    return {
      todos: [
        "I am done",
        "I am not done"
      ]
    }
  },
  render: function() {
    var todos = this.state.todos.map(function(todo) {
      return <div>{todo}</div>;
    });
    return <div>
      <h3>Todo(s)</h3>
      {todos}
      <TodoForm />
    </div>;
  }
});
var TodoForm = React.createClass({
  getInitialState: function() {
    return {
      todoInput: ""
    }
  },
  handleOnChange: function(e) {
    e.preventDefault();
    this.setState({todoInput: e.target.value});
  },
  handleClick: function(e) {
    e.preventDefault();
    //add the new todo item
  },
  render: function() {
    return <div>
      <br />
      <input type="text" value={this.state.todoInput} onChange={this.handleOnChange} />
      <button onClick={this.handleClick}>Add Todo</button>
    </div>;
  }
});
React.render(<Todos />, document.body)
I have an array of todo items which is maintained in the parent's state.
I want to access the parent's state and add a new todo item, from the TodoForm's handleClick component.
My idea is to do a setState on the parent, which will render the newly added todo item.
