I am trying to use the inline if statement to check if a piece of data exists and if it displays it. this code is currently in my render, return block.
the problem i am facing is that using this the content is no longer displayed
{(() => { if (this.props.data.size) { <Text style={styles.headerLabel}>Sizes</Text> {(this.props.data.size||[]).map((section,i) => ( <AddToCartRow key={i} data={section} productName={this.props.data.name} value={Config.priceToPriceWithCurrency(section.price)} /> ))} } })()}
source share