title: "startIndex" of Recharts Brush does not change even though using setState and state was changed
body: <p>I want change startIndex using button, but it does not work.</p>
  <pre><code>const [startIndex, setStartIndex] = useState(0);
  ...
  &lt;Brush dataKey=&quot;date&quot; startIndex={startIndex} /&gt;
  ...
  &lt;Button onClick = { () =&gt; setStartIndex(30) } &gt; Change &lt;/Button&gt;
  </code></pre>
  <p>When checking using useEffect as shown below, the variable changed properly.</p>
  <pre><code>useEffect(() =&gt; {
      console.log(startIndex)
  }, [startIndex])
  </code></pre>
  <blockquote>
  <p>0    // first rendered</p>
  </blockquote>
  <blockquote>
  <p>30   // button clicked</p>
  </blockquote>
  <p>It works only the size of window changed. Any solutions for that?</p>