初始化ListView
XXXDataSource: new ListView.DataSource({
getRowData: (XXList: Type[], sectionID: string, rowId: string) => {
return XXList[sectionID][rowId];
},
rowHasChanged: <T extends {}>(row1: T, row2: T) => row1 !== row2,
sectionHeaderHasChanged: <T extends {}>(s1: T, s2: T) => s1 !== s2
})
拿到异步数据之后使用cloneWithRowsAndSections
renderRow中返回处理组件,如果需要可以格式化流程。