title: Rxjs debounce on react text input component using Subjects does not batch input text on stateless/functional component
body: <p>I'm trying to dive deeper into rxjs and found an issue where the input field I'm trying to debounce dispatches an event on every keypress, the debounce only holds the output but results in a tree like:</p>
  
  <pre><code>a
  as(delay - waits 200ms, then fires the rest synchronously)
  asd
  asdf
  asdfg 
  ....
  </code></pre>
  
  <p>The same code works as expected in a class component(<a href="https://stackoverflow.com/a/44300853/1356046">https://stackoverflow.com/a/44300853/1356046</a>) but cannot understand why it doesn't work with stateless components. Here's an example: <a href="https://stackblitz.com/edit/react-hzhrmf" rel="nofollow noreferrer">https://stackblitz.com/edit/react-hzhrmf</a> - you can see the useState update fires for every keystroke. </p>
  
  <p>Thanks a lot.</p>