Is there a way to avoid the if and probably use a ternary or logical && for below scenario. Looks like react always looks for a an explicit return statement always for any component
const reactComp = ({ abc, xyz }) => {
if (something) {
return (
<Grid.Container>
<Grid.Row>
<Grid.Col md="6">
<Panel title="Title">
<Text>{mmmm}</Text>
</Panel>
</Grid.Col>
</Grid.Row>
</Grid.Container>
);
} else {
return null;
}
};