Answer the question
In order to leave comments, you need to log in
How to load content on scroll in React/Redux?
How to load content on scroll with React/Redux? There is an action with loading cards from the API, it has arguments with limit, skip, but how to attach scroll to this, how will it understand that it is scrolled to the bottom of the page and is it time to make a new request for the next cards in the list? Maybe there are packages that make life easier with this?
Answer the question
In order to leave comments, you need to log in
try it
$(window).on('scroll', function(){
if( $(window).scrollTop() > $(document).height() - $(window).height() ) {
//вызов апи
}
}).scroll();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question