operators in react code example
Example: how to use if else inside jsx in react
renderElement(){
if(this.state.value == 'news')
return data ;
return null;
}
render() {
return (
{ this.renderElement() }
)
}