title: Clearing textarea on pressing enter in React, in a stateless component
body: <p>I'm building a chat component in React and can't figure out how to clear the textarea element after the enter key is pressed. The component is stateless, and there are no props associated with the textarea, so it is never re-rendered.</p>
  
  <pre><code>sendMessage(e) {
    if (e.key === 'Enter') {
      this.props.onKeyUp(e.target.value)
      // I want to clear the textarea around here
    }
  }
  
  render() {
    return(
    ...
    &lt;textarea onKeyUp={this.sendMessage}&gt;&lt;/textarea&gt;
    ...
  </code></pre>