import React, { PropTypes } from 'react'

class TodoForm extends React.Component {
  static propTypes = {
    onAddTodo: PropTypes.func.isRequired
  };

  render () {
    return (
      <div className='todo-form'>
      <form className='form-inline' onSubmit={event => this.handleFormSubmit(event)}>
          <input type='text'
              className='form-control text-input'
              ref={node => this.input = node}
              placeholder='What needs to be done?'
            />
        &nbsp;
        <button className='btn btn-default'>Add</button>
      </form>
      </div>
    )
  }

  handleFormSubmit (event) {
    event.preventDefault()

    const text = this.input.value
    if (text !== '') {
      this.props.onAddTodo(text)
      this.input.value = ''
    }
  }
}

export default TodoForm

@@ -269,28 +269,24 @@
  this.handle
-Form
 Submit(event
@@ -598,20 +598,16 @@
   handle
-Form
 Submit (
@@ -735,16 +735,20 @@
 text)%0A  
+  %7D%0A
     this
@@ -765,22 +765,16 @@
 ue = ''%0A
-    %7D%0A
   %7D%0A%7D%0A%0Ae

Rename an internal method