Web Component Lifecycle class CustomAlert extends HTMLElement { static get observedAttributes() { return [‘icon’, ‘theme’]; } constructor() { super(); } connectedCallback() {} disconnectedCallback() {}
// componentDidMount // componentWillUnmount
attributeChangedCallback(name, oldValue, newValue) {} } customElements.define(‘custom-alert’, CustomAlert);