connectedCallback() – Lifecycle Hooks
Lifecycle FlowThis diagram shows the flow of the component lifecycle from creation through render. Run Code When a Component Is Inserted or Removed from the DOM The connectedCallback() lifecycle hook fires when a component is inserted into the DOM. The disconnectedCallback() lifecycle hook fies when a component is removed from the DOM….