When to use CustomComponent?

Hi,

I would like to know in which cases should I extend a CustomComponent and what is different from extending an HorizontalLayout or a VerticalLayout.

CustomComponent is useful for encapsulation, so that it hides implementation details, especially what internal layout it uses.

Other than that, it doesn’t matter much.

It’s also reusable.