I’m using my component as below and I want to not render the grid if the component inside doesn’t return any elements ( inside the component i return null if there is no data ).
notice that I don’t want to check the data in the below component.
Just wondering if there is a conditional that I can check if a component renders and handle parent elements based on that!
<Grid xs={12} md={6}>
<DashboardLongTermSuggestedPackages />
</Grid>
the below is what I see in the page elements when the DashboardLongTermSuggestedPackages
is empty, which I don’t want to exist on my page.
<div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-6 muirtl-zbou0d-MuiGrid2-root"></div>