Web Components let you define new HTML tags, referred to as custom elements. These tags can then be used in your app’s HTML code directly, like this :
In this example,
<share-buttons/> will be interpreted by the browser and “replaced” by the HTML markup you have defined. This will result in :
It may also include custom JS logic, for instance the Facebook and Twitter links could listen to
click events and share the current page when a link is clicked.
Web components are similar to Vue.js components. They have a lifecycle, properties, and can be nested. They have a different API that is less powerful but standard, defined by
... read the whole story at vuetips.com.