Paginate date-specific results from an API with React and Redux : <p>I want to show some news in my React app using Redux.</p>

<p>The problem is that I want to show the news for individual dates and I want to paginate the news.</p>

<p>In my API I print</p>

<pre><code>{
  pagination: {
    count: 1000,
    size: 10,
    page: 1,
    pages: 100
  },
  news: [
    ..
  ]
}
</code></pre>

<p>I know how to make a simple pagination, but I don't know how the API should work if I want to be able to show news for different dates in my app.</p>

<p>Until now (without dates), I have just kept a state <code>news</code> and <code>pagination</code> in my Redux reducer, and then checked if the page number equals the total number of pages to determine whether it should try loading more news.</p>

<p>But now that I potentially have many different dates and I want to keep all the news in the Redux store, I don't know how to structure it.</p>

<p>I can keep my API as it is, since filtering with GET parameter <code>?date=15-09-2017</code> will just decrease the number of news in the API result.</p>

<p>But would it still be possible to just keep all the news in an array in a <code>news</code> variable in my reducer or do I have to structure it to be something like</p>

<pre><code>news: {
  '15-09-2017': {
    news: [...],
    pagination: {}
  },
  ...
}
</code></pre>

<p>in order to keep track of the pagination for every single date?</p>
