conditional rendering component react hooks code example
Example: adding a if stement in jsx
render() {
return (
<View style={styles.container}>
{this.state.value == 'news'? <Text>data</Text>: null }
</View>
)
}