Check The Type Of A Child Component
There is a simple way to check the type of a child component.
This is a comparison of the child's type to the component constant we are looking for.
This comparison is not the most robust. For instance, Gatsby does something internally that throws off this comparison. Here is a more robust comparison.
Last updated