React and .NET app data fetching in portions

I tried to find the answer to my question, but it seems like I am either missing correct terminology or it really is a bit tricky to do.

I am trying to see if it is possible to utilise either Lazy Loading, or data sent from API in portions periodically, so loading time does not take as long to reach first render. My current system where an array of over 1000 objects is being fetched from .NET API into React UI just does not work as I would like it to.

I would like to skip pagination if possible.

Add Comment
1 Answer(s)

Just implement the endpoint GET /data?show=X&skip=Y, for first request get data from /data?show=10, then whenever you want (for example when user reaches the bottom of website), do /data?show=10&skip=10

I’m not sure if I understood you correctly, but I hope it helps somehow 🙂

Answered on July 16, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.