typescript add if in render 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 }
)
}