content: import React from 'react'
  import { connect } from 'react-redux'
  import { addTodo } from '../actions'
  
  const AddTodo = ({dispatch}) => {
      let input
      return (
          <form onSubmit={ e => {
              e.preventDefault()
              var text = input.value.trim()
              if (!text) {
                  return
              }
              dispatch(addTodo(text))
              input.value = ''
          } }>
              <input type="text" ref={ node => input = node } />
              <input type="submit" value="add" />
          </form>
      )
  }
  
  export default connect()(AddTodo)
  