Relative Content

Tag Archive for reactjsjsxconditional-rendering

How to check if a component is rendered or not using Javascript in React

I’m using my components as below and I want to check if the inner component is being rendered and take some decisions based on that.
like not rendering the parent components and showing empty-content instead of the inner component without checking the inner data.
is there something like !!DashboardLongTermSuggestedPackages for that?

How to check if a component is rendered or not in react

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!