A component can be any combination of elements that are styled together to create a larger component.
True Web components are custom HTML elements with their own JS API that encapsulates their functionality, style and markup using a Shadow DOM and HTML Template, allowing for their re-use without fear of colliding with other code.
There are four lifecycle methods associated with them:
constructor() creates the elementconnectedCallback() called when the element is added to the DOMdisconnectedCallback() called when the element is removed from the DOMattributeChangedCallback() called whenever the value of a component’s
attribute changesReferences: