To understand the holes in a component, you might want to read this first:
Long story short, some generic “boxes” components like Sidebar or a Dialog box in React are not aware of their children ahead of time. In those cases, React recommends that those components use their special children props to pass the children elements into their output.
So, as we saw in the containment demo example, we are passing the contents as children props in another component. But you don’t need to do that every time.
Sometimes, you just want to pass them using your own different convention rather than just children props. That way you create holes in your react components.
Just like this example:
Sidebar and MainContents are objects so we can pass them just like we pass children props. React components are very flexible as you can pass almost anything to it.
components props