title: react-bootstrap-table2 pagination is not working with useState
body: <p>I am using react-bootstrap-table2 pagination in my react application.I am using a state to update the sizePerPage dynamically.But it is not working. When I console the state, I am able to see the change, but it is not updating the pagination.</p>
  <pre><code>Here is my code:
  const [sizePerPage,setSizePerPage] = useState(10);
  const pagination = paginationFactory({
  page:1,
  sizePerPage:sizePerPage,
  .......
  onPageChange:function(page,sizePerPage),
  onSizePerPageChange:function(page,sizePerPage)
  });
  </code></pre>
  <p>Here I am changing the state:</p>
  <pre><code>&lt;select onChange={e=&gt;setSizePerPage(e.target.value)}&gt;
  &lt;option value={10}&gt;10&lt;/option&gt;
  &lt;option value={25}&gt;25&lt;/option&gt;
  &lt;option value={50}&gt;50&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  <p>Rest of the things are working fine.</p>