Check out example codes for "how to get the name of a html balise and pass it in onPress". It will help you in understanding the concepts better.

Code Example 1

<Button title="News" id={this.props.prop_where_id_is} onPress={() => this.setCategory(this.props.prop_where_id_is)} />

Learn ReactJs, React Native from akashmittal.com