I'm trying to print an Array whose name is being calculated based on selected value. e.g.
const ANotes = ["B", "C", "D"];
const keyNotes = MyNotes[selected] + "Notes"; //value is ANotes
Trying to render it as:
<View>
{{keyNotes}.map((item, key)=>(
<Text key={key}
//style={styles.TextStyle}
//onPress={ this.SampleFunction.bind(this, item) }
> { item } , </Text>)
)}
</View>
When I try to render it in View in my Component it gives error. I'm new to React Native so not able to figure this one. I want the output to show B, C, D in the App.
It gives error: TypeError: undefined is not a function.