I am using the below statement to conditionally render a component.
{data?.length && <RenderThisComp />}
data - an array.
RenderThisComp - a component that needs to be rendered only if data array has any value.
If the length of data array is zero, it is showing zero, whereas it should display nothing.
{data.length && <RenderThisComp/>}(data || []).length && < ... >.{data?.length > 0 && <RenderThisComp />}should work.