因此,我使用flatlist来响应本机,但是,我不能用平面列表显示数据,而且节点模块最终会出现此错误。
FlatList使用:
<FlatList
style={{ height: "100%" }}
data={matches}
keyExtractor={(item) => item.id}
renderItem={(item) => <ChatRow matchDetails={item} />}
/>节点模块中的Index.d.ts
const originalXMLHttpRequest: any;
const __BUNDLE_START_TIME__: number;
const ErrorUtils: ErrorUtils;它有以下错误:
Cannot redeclare block-scoped variable 'originalXMLHttpRequest'.
Cannot redeclare block-scoped variable '__BUNDLE_START_TIME__'.
Cannot redeclare block-scoped variable 'ErrorUtils'.
Cannot redeclare block-scoped variable '__DEV__'.
Cannot redeclare block-scoped variable 'HermesInternal'.发布于 2022-02-25 03:27:15
检查renderItem({项、索引、分隔符})
所以用这个renderItem替换renderItem={({item}) => <ChatRow matchDetails={item} />}
https://stackoverflow.com/questions/71260311
复制相似问题