Clear React Native TextInput : <p>Working through the Redux AddTodo example in React Native. The first AddTodo example below uses state to store the TextInput value and works fine.</p>

<pre><code>class AddTodo extends React.Component{

    constructor(props){
        super(props);
        this.state = { todoText: "" }; 
    }
    update(e){
        if(this.state.todoText.trim()) this.props.dispatch(addTodo(this.state.todoText)); 
        this.setState({todoText: "" }); 
    }
    render(){
        return(
            &lt;TextInput 
                value = {this.state.todoText}
                onSubmitEditing = { (e)=&gt; { this.update(e); } }
                onChangeText = { (text) =&gt; {this.setState({todoText: text}) } } /&gt;
        );
    }
}
</code></pre>

<p>However following a few of the Redux examples, the following code is much shorter and also works except that the <code>TextInput</code> <code>value</code> is not cleared after submitting</p>

<pre><code>let AddTodo = ({ dispatch }) =&gt; {

  return (
      &lt;TextInput 
          onSubmitEditing = { e =&gt; { dispatch(addTodo(e.nativeEvent.text)) } } 
      /&gt;
  )
}
</code></pre>

<p>Is there any way I can clear the InputText value from onSubmitEditing?</p>
