You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.
Can you use the component inside any type of parent (host) element, or with any type of child elements?
[This article is a stub, and is not yet complete.]
Unless there is a direct need, it's usually best to design a component such that it can work inside any type of parent element and (if the component has a <slot> to accept children) with any type of child element.
It’s fairly rare to find a component that has no meaning outside the context of a particular host. Even a <li> found outside its normal <ul> or <ol> context will still render as a list item. At a minimum, a component that finds itself inside an unexpected host type should avoid throwing exceptions. Keep in mind that components can be subclassed, so even a compatible host could have an unexpected tag. (See Subclassable.)