我想用平面列表onEndReached
对本地数组数据进行分页
该数组是:
const data = [
{lottie: require('./resources/001.json'), name: '001'},
{lottie: require('./resources/002.json'), name: '002'},
{lottie: require('./resources/003.json'), name: '003'},
{lottie: require('./resources/005.json'), name: '005'},
{lottie: require('./resources/006.json'), name: '006'},
{lottie: require('./resources/007.json'), name: '007'},
{lottie: require('./resources/010.json'), name: '010'},
{lottie: require('./resources/011.json'), name: '011'},
{lottie: require('./resources/012.json'), name: '012'},
{lottie: require('./resources/013.json'), name: '013'},
{lottie: require('./resources/015.json'), name: '015'},
{lottie: require('./resources/016.json'), name: '016'},
{lottie: require('./resources/017.json'), name: '017'},
{lottie: require('./resources/019.json'), name: '019'},
{lottie: require('./resources/020.json'), name: '020'},
{lottie: require('./resources/021.json'), name: '021'},
{lottie: require('./resources/022.json'), name: '022'},
{lottie: require('./resources/023.json'), name: '023'},
{lottie: require('./resources/025.json'), name: '025'},
{lottie: require('./resources/027.json'), name: '027'},
{lottie: require('./resources/029.json'), name: '029'},
{lottie: require('./resources/030.json'), name: '030'},
{lottie: require('./resources/031.json'), name: '031'},
{lottie: require('./resources/033.json'), name: '033'},
{lottie: require('./resources/034.json'), name: '034'},
{lottie: require('./resources/035.json'), name: '035'},
{lottie: require('./resources/036.json'), name: '036'},
{lottie: require('./resources/038.json'), name: '038'},
{lottie: require('./resources/039.json'), name: '039'},
{lottie: require('./resources/040.json'), name: '040'},
{lottie: require('./resources/041.json'), name: '041'},
{lottie: require('./resources/042.json'), name: '042'},
{lottie: require('./resources/044.json'), name: '044'},
{lottie: require('./resources/045.json'), name: '045'},
{lottie: require('./resources/046.json'), name: '046'},
{lottie: require('./resources/049.json'), name: '049'},
{lottie: require('./resources/050.json'), name: '050'},
{lottie: require('./resources/051.json'), name: '051'},
{lottie: require('./resources/052.json'), name: '052'},
{lottie: require('./resources/054.json'), name: '054'},
{lottie: require('./resources/055.json'), name: '055'},
{lottie: require('./resources/056.json'), name: '056'},
{lottie: require('./resources/059.json'), name: '059'},
{lottie: require('./resources/060.json'), name: '060'},
{lottie: require('./resources/061.json'), name: '061'},
{lottie: require('./resources/066.json'), name: '066'},
{lottie: require('./resources/067.json'), name: '067'},
{lottie: require('./resources/069.json'), name: '069'},
{lottie: require('./resources/070.json'), name: '070'},
{lottie: require('./resources/071.json'), name: '071'},
{lottie: require('./resources/072.json'), name: '072'},
{lottie: require('./resources/074.json'), name: '074'},
{lottie: require('./resources/076.json'), name: '076'},
{lottie: require('./resources/079.json'), name: '079'},
{lottie: require('./resources/080.json'), name: '080'},
{lottie: require('./resources/083.json'), name: '083'},
{lottie: require('./resources/085.json'), name: '085'},
{lottie: require('./resources/086.json'), name: '086'},
{lottie: require('./resources/087.json'), name: '087'},
{lottie: require('./resources/088.json'), name: '088'},
{lottie: require('./resources/090.json'), name: '090'},
{lottie: require('./resources/093.json'), name: '093'},
{lottie: require('./resources/094.json'), name: '094'},
{lottie: require('./resources/095.json'), name: '095'},
{lottie: require('./resources/096.json'), name: '096'},
{lottie: require('./resources/098.json'), name: '098'},
{lottie: require('./resources/099.json'), name: '099'},
{lottie: require('./resources/100.json'), name: '100'},
{lottie: require('./resources/101.json'), name: '101'},
{lottie: require('./resources/102.json'), name: '102'},
{lottie: require('./resources/103.json'), name: '103'},
{lottie: require('./resources/104.json'), name: '104'},
{lottie: require('./resources/105.json'), name: '105'},
{lottie: require('./resources/106.json'), name: '106'},
{lottie: require('./resources/107.json'), name: '107'},
{lottie: require('./resources/108.json'), name: '108'},
{lottie: require('./resources/110.json'), name: '110'},
{lottie: require('./resources/111.json'), name: '111'},
];
在这里,当我一次加载所有文件时,需要7秒钟,现在我要加载10个项目,到结束时,还要加载10个项目。 我知道要分页网络数据(获取),但实际上我不知道如何在本地数组数据中实现它。