for(var index in preguntas.questions) {
var attr1 = preguntas.questions[index]
console.log(sum + " ***********************************************pregunta" + attr1.text )
for(var index2 in attr1.answers) {
var attr4 = attr1.answers[index2];
respuesta.push(
<View key = {index2} >
<RadioButton onPress={() => this.onSubmitPressed(index2)} >
<Text>{attr4}</Text>
</RadioButton>
</View >
)
}
questions.push(
<View key = {index}>
<View>
<Text >{attr1.text}</Text>
{respuesta}
</View>
</View>
)
var respuesta = [];
/*for(var index55 in attr2.answers) {
var attr4 = attr2.answers[index2];
console.log(sum + " ***********************************************" + attr4 )
respuesta.push(`enter code here`
<View key = {index55}>
<View>
<Text >{attr4}</Text>
</View>
</View>
)
}*/
}
Good morning I'm trying to run the onpres function that is onSubmitPressed but it will not let me and I get the following error ReactNativeJS: NETWORK error: TypeError: undefined is not a function (evaluating 'this.onSubmitPressed (index2)')
The code is inside the renderMovie function If I could help with that greetings