I am trying to iterate over all items in my array, using the map method, but it doesn't iterate over any items while there are item in the array. Am I missing something?
answers(answers: IAnswer[]) {
console.log(answers);
return (
<View>
{
answers.map((answer) => {
<Text key={answer.id}>Test</Text>
})}
</View>
)
}
console.log output:
[
{
"correct":false,
"id":"11",
"value":"De vorm van een zon"
},
{
"correct":false,
"id":"22",
"value":"Een vierkant"
},
{
"correct":true,
"id":"33",
"value":"Vierkant of rechthoekig"
}
]