Creating Complex Components

Up to this point, we have only been using the component that creates a simple button. But components can be much more complex and can have their own data, methods, computed properties and a complex template structure.

Vue requires that all components have a single root element, which means that a component template must only have one element at its root. Having more than one element will result in an error.