How to optimize WeChat Mini Programs paging load?

the current solution is very common, which is to get the next page of data, splice it to the original data, and then set it into data

.
let origin_data = this.data.list
let new_data = origin_data.concat(res.data)
this.setData({
    list: new_data
})

this method is fine for a small amount of data in data, but if the item data in data is complicated, it is slow to render. I saw a method that only set the newly fetched array on the Internet, but I don"t know how to operate it through index,.

Mar.06,2021

I hope it helps you
https://blog.csdn.net/abc5646.

Menu