<SectionList
sections={[{ data: [1, 2] }, { data: [3, 4] }]}
renderItem={({ item, index }) => ...}
renderSectionHeader={({ section, index }, i) => {
console.log(index, i); // both undefined
}}
/>
我想在renderSectionHeader.
例如。index当 is时应为 0,当section.datais时应为[1, 2]1 。section.data[3, 4]
除了将索引添加到sections数据中之外,我如何才能做到这一点?