I write a calculator app and i need to generate touchable opacity using map I have a nested array
state= {
buttons:['+', '-', '*', '/', 'Del']
}
And I generate touchable opacity using map
<View style={styles.container}>
<View style={styles.second_con}>
{
this.state.buttons.map((item,index)=>{
return(
<TouchableOpacity style={styles.buttons} key={index}>
<Text>{item}</Text>
</TouchableOpacity>
)
}
)
}
</View>
</View>
And it works How can i generate it using nested array ?
buttons1:[['√', ' ', 'x!', '+/-', '%'],
['e^x', '10^x', 1, 2, 3],
['ln', 'log', 4, 5, 6],
['e', '^2', 7, 8, 9],
['π', '^3', ',', 0, '='],
]