R
R
rsoinvi2018-07-17 13:15:50
React
rsoinvi, 2018-07-17 13:15:50

How to make pagination in reactjs? (no third party libraries for components)?

There is an apiha with users It is
necessary to make pagination on the site but without third-party libraries
As I understand it, you first need to parse everything in the repository and then work with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2018-07-17
@rockon404

As I understand it, you first need to parse everything in the repository and then work with it?

You all misunderstood. Pagination should be on the server side, and the parameters should be supported by the API.
Request example: Response example:
{
  users: [ ... ],
  page: 3,
  limit: 20,
  quantity: 450,
}

Based on the page data, the total number of users and the limit, build a paginator on the client.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question