Answer the question
In order to leave comments, you need to log in
Loading data with Ajax in React?
For example, I have list.json, where there are 1000 users (First name + Last name)
I need to display the first ones on the screen and so that when the button 'show another 10-20-100' is clicked, data is added, in which direction to dig!??
Thank you)
Answer the question
In order to leave comments, you need to log in
Store the limit value in the state - this is the number of records to be loaded and offset - the offset from the beginning of the array.
For example, when loading a component, you load limit records from the offset element. After loading, change offset to offset + limit. And with each loading of elements you repeat this operation
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question