Custom component not displaying children

Hi! I’ve created a custom component that should take children following the documentation, but I can’t get it to display them. it doesn’t display a thing.


as you can see. Tere it is in the visual editor, I’ve just put background color to visualize it, it has two child images. But inspecting it from the browser, the images are outside of the component, and although they have a seted height and width in the editor, they appear to have no height and width on the final page.

imagen

I don’t know if there’s something I’m doing wrong

Hi Javier,

There looks like there may be a few things missing. I would make sure that your .registerComponent method is following the layout from the documentation… you have the @type, but you don’t have the component. Also, props.children is spelt incorrectly.

I’ve attached the proper documentation that you would be able to follow in order to create children within a custom component:

1 Like