Uploading this with the help of boilerplate Ajax calls to React?

For example, I have list.json, where there are 1000 users(Name+Surname)
I need to display first and when you click on the button 'show more 10-20-100' added data, in what direction to dig!??
Thank you)
March 19th 20 at 09:26
2 answers
March 19th 20 at 09:28
March 19th 20 at 09:30
Keep in state the limit value is the number of loaded records and offset - the offset from the beginning of the array.
For example when loading component load limit of records from the offset. After the download, change offset to offset + limit. And at each loading of elements, repeat this operation
My first time, it turned out)

So generally acceptable, lines 41 and 26-31 ?

https://codesandbox.io/s/1yvr3386vq - Veronica20 commented on March 19th 20 at 09:33
@Veronica20, no sense in uploading in order to retrieve the information piecemeal, rather than all at once. You will immediately receive the entire list. In didMount need to get the first 10 elements for example, and then clicking the button to fetch another 10 and add the following in the state - Ro commented on March 19th 20 at 09:36

Find more questions by tags ReactAJAX