Displaying contents of array on multiple lines in React Native -
i have array of strings display on screen on multiple lines in react native ios. in text view, have 1 line of code:
<text style={styles.text}> {this.state.selectdata} </text>
i display 3 elements of selectdata array per line, can't figure out how go executing it.
something this
render(){ <view> {this.state.selectdata.map((value, index) => { return ( <text key={index}> {value} </text> ); }) } </view> ); }
Comments
Post a Comment