Pagination 如何在React Native中对从API获取的数据进行分页

Pagination 如何在React Native中对从API获取的数据进行分页,pagination,react-native-android,Pagination,React Native Android,我正在尝试对使用API获取的记录进行分页。我不知道如何添加分页。我的代码是: handlePressProduct(id) { var url='http://www.example.com/menu_category_listing.php?cat_id='; fetch(url+id, { method: 'GET' }).then((response) => { return response.json() } ) .then((respon

我正在尝试对使用API获取的记录进行分页。我不知道如何添加分页。我的代码是:

handlePressProduct(id) {
    var url='http://www.example.com/menu_category_listing.php?cat_id='; 
    fetch(url+id, {
    method: 'GET'
    }).then((response) => { return response.json() } )
    .then((responseJson) => {
    console.log(responseJson);          Actions.category({dataSource:ds.cloneWithRows(responseJson),data:responseJson,})     
    })

      }

将其发布数据正确地发布到Actions.category()。数据太大,因此加载它需要时间。所以我需要添加分页。

我认为如果您在服务器上进行分页会更好。

可能的副本