This is my API and I want to call this API in my react native code and this should be in pagination
"Pagination": {
"showing": "Showing 1-10 of 61 results",
"data": [
{
"name": "PREV",
"onclick": 1,
"value": 0,
"disabled": " disabled ",
"active": " "
},
{
"name": "1",
"onclick": 0,
"value": "1",
"disabled": " disabled ",
"active": " active "
},
{
"name": 2,
"onclick": 1,
"value": 2,
"disabled": " ",
"active": " "
},
{
"name": 3,
"onclick": 1,
"value": 3,
"disabled": " ",
"active": " "
},
{
"name": "NEXT",
"onclick": 1,
"value": 2,
"disabled": " ",
"active": " "
}
]
you can use FlatList and passing a callback method to onEndReached you can fetch paginated data. Ref. https://reactnative.dev/docs/flatlist#onendreachedthreshold
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.