Answer the question
In order to leave comments, you need to log in
What is the best way to load data?
Hello, I can’t find the best solution to the following problem:
in componentDidMount I get a list of records via ajax, and display them in 2 pieces (there will be 100 on the prod, now there are just few test records, it’s so convenient for me). After the output, I show the "Load more" button, by clicking on which the following records are loaded. Back on node js, mongodb base, I limit the selection like this:
{$skip: (pageNumber > 0) ? ((pageNumber - 1) * nPerPage) : 0}, //pageNumber- номер страницы, nPerPage- лимит
{$limit: nPerPage}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question