connectedcallback web components code example
Example: connectedcallback web components
it is a method of web componentst that is called when the element has been inserted into the DOM tree. You can compare this to React's componentDidMount method.