how to get around setting state in conditionally rendered code block react code example
Example: adding a if stement in jsx
render() {
return (
<View style={styles.container}>
{this.state.value == 'news'? <Text>data</Text>: null }
</View>
)
}