I'm trying to conditionally render based on an array having values in it. So basically if this.props.data == [] don't render. If this.props.data == [{data is here}] render.
Things I've tried.
if prop exists
{this.props.data && <Field
label="Data"
name="data"
type="select"
component={SelectComponent}>
<option>Select data</option>
</Field> }
===Still Renders===
null
{this.props.data != null && <Field
label="Data"
name="data"
type="select"
component={SelectComponent}>
<option>Select data</option>
</Field> }
===Still Renders===
length
{this.props.data.length > 0 && <Field
label="Data"
name="data"
type="select"
component={SelectComponent}>
<option>Select data</option>
</Field> }
===Length is not defined===