title: What does flushSync() do in React?
body: <p>I saw Dan Abramov's demo project at JSConf Iceland, but I didn't understand why he used <code>flushSync</code> in <a href="https://github.com/facebook/react/blob/b6df4417c79c11cfb44f965fab55b573882b1d54/fixtures/concurrent/time-slicing/src/index.js#L79" rel="noreferrer">this code</a>:</p>
  <pre><code>  import { flushSync } from 'react-dom';
  
    debouncedHandleChange = _.debounce(value =&gt; {
      if (this.state.strategy === 'debounced') {
        flushSync(() =&gt; {
          this.setState({value: value});
        });
      }
    }, 1000);
  </code></pre>
  <p>What does flushSync do in react?</p>