In my render method I'd like to display one of two View components depending on a conditional that's in my props. e.g:
render() {
return(
<View>
<View>View A</View>
<View>View B</View>
</View>
);
}
Where the conditional is this.props.myConditional. If false, show A, if true, show B...
It's actually pretty easy
render() {
return <View>
{this.props.myConditional ? <View>View B</View> : <View>View A</View>}
</View>
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With