if in render react native code example
Example: adding a if stement in jsx
render() {
return (
{this.state.value == 'news'? data : null }
)
}
render() {
return (
{this.state.value == 'news'? data : null }
)
}