<Table borderStyle={{borderColor: '#C1C0B9'}}>
{
tableData.map((rowData, index) =>
(
<View>
<Row
key={index}
data={rowData}
widthArr={state.widthArr}
style={[styles.row, index%2 && {backgroundColor:
'#F7F6E7'}]}
textStyle={styles.text}
/>
</View>
))
}
</Table>
这是 Json 响应数据
var tableData = [
{
"activityType": "RUNNING",
"averageHeartRateInBeatsPerMinute": 132,
"comments": "",
"durationInSeconds": 4915,
"id": "2672760140",
"startTimeInSeconds": 1525437416,
"startTimeOffsetInSeconds": -14400,
"summaryId": "2672760140",
},
{
"activityType": "OTHER",
"averageHeartRateInBeatsPerMinute": 106,
"comments": "",
"durationInSeconds": 60,
"id": "2672781872",
"startTimeInSeconds": 1525442382,
"startTimeOffsetInSeconds": -14400,
"summaryId": "2672781872",
},
]
当我尝试将此数组映射到它抛出的行时,Null 不是对象错误。你能建议这个问题的解决方案吗