OptionalafterOptionalbeforeCalled immediately before each template update
OptionalfinalizeCalled as the final lifecycle method at the end of the unmounting process.
OptionalinitialThe initial state for this Component.
A plain object is deep-cloned for each instance. A State instance is shared by every instance (useful for stores). A function is called once per instance when it first connects.
OptionalobservedAttributes to watch for changes for updates.
OptionalonIf defined, receives errors caught during the lifecycle methods of this
component and unhandled errors from its children. If not defined, errors
escalate to the nearest ancestor component with an onError handler, and
are thrown globally if there is none.
OptionalrootThe mode for this Component's ShadowRoot.
MDN: https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/mode
OptionalscriptInitialization scripting for this Component
OptionalstyleStyles to encapsulate to this component's root.
OptionaltemplateAn HTML Template element for this element to use.
OptionaltemplateA function returning an object which populates the data values in the
templating engine. Such values are accessed using the * notation.
Called on every render with the host's current attributes and state.
Optionalattributes: Record<string, string | null>Optionalstate: StateShape
Called immediately after each template update