Web components are a declared standard of features that allow developers to extend the HTML structure with new elements, as well as encapsulate styles and behavior. One of the main reasons developers choose a modern component-based framework is to have the ability to decompose their app into smaller units, namely components.
Web components are comprised of key features that enable this scenario:
- Custom elements enable extending HTML with new elements.
- Shadow DOMs allow encapsulation of DOM and styles.
- HTML import supports external sources.
- HTML templates let you construct repeatable structures at will.
The fact that such capability is now met as standard can be quite revolutionary. Now one can develop such components using ...