V
V
Vladislav Bezenson2016-05-30 18:39:06
PHP
Vladislav Bezenson, 2016-05-30 18:39:06

How to make infinite scroll with adding items on top?

Let's say I have a node.js API server that returns an array of 10 news items. The user uploaded 10 pieces. Then 10 more, specifying the offset parameter. Now suddenly more news is added. And if the user loads the news after that with the offset parameter, then the news already loaded before will get into the first element. How is it usually done in such cases? In principle, this is exactly the case in VK.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tasce, 2016-05-30
@tasce

In such cases, a label is added. That is, we do not just load 10 news, but 10 news, starting with such and such an id.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question