title: How to clear TextInput on send button in React native with redux
body: <p>I am working on chat app using react native with redux, where messages are sending through the send button. But whenever I sent a message on hitting the send button, the <code>TextInput</code> is not clearing. 
  I want to clear the <code>TextInput</code> field on hitting the send button. Here I am working in redux so I don't want to use <code>state</code> with <code>value</code>. </p>
  
  <p>Here is the code :</p>
  
  <pre><code>class Chat extends Component {
  
    componentWillMount() {
      this.props.fetchChat(this.props.receiverId);  
  }
  
  message(text) {
    this.props.writeMsg(text);    
  }
  onSend = () =&gt; {
  
    const { userId , receiverId, text } = this.props;
    this.props.sendMessage({userId , receiverId, text});
  }
  
    render() {
  
      return (
        &lt;View style={{ flex: 1 }}&gt;
  
              &lt;FlatList 
                inverted={-1}
                style={styles.list}
                extraData={this.props}
                data={this.props.convo}
                keyExtractor = {(item) =&gt; {
                  return item.id;
                }}
                renderItem=   
                &lt;ChatItem value={this.renderItem} /&gt;           
                /&gt;
  
               &lt;MessageInput 
               onChangeText={text =&gt; this.message(text)}
               onPress={this.onSend }
              /&gt;          
        &lt;/View&gt;
      );
    }
  }
  
  </code></pre>
  
  <p>And this is the component MessageInput's code:</p>
  
  <pre><code>  &lt;View style={inputContainer}&gt;
              &lt;TextInput style={inputs}
                  placeholder="Write a message..."
                  onChangeText={onChangeText}
                /&gt;
            &lt;/View&gt;
  
              &lt;TouchableOpacity style={btnSend} onPress={onPress }&gt;
                &lt;Icon
              name='send'
              type='MaterialIcons'
              color='#fff'
              style={iconSend}
              /&gt;  
              &lt;/TouchableOpacity&gt;
  </code></pre>