DrSensor / nusa

incremental runtime that bring both simplicity and power into webdev (buildless, cross-language, data-driven)
MIT License
4 stars 0 forks source link

<slot> #8

Open DrSensor opened 2 years ago

DrSensor commented 2 years ago

To guarantee and not break the dom isolation, the implementation might involve one or many of this features:


<slot> is a native WebComponent feature. The usual usage is like a portal but I'm thinking it's worth more. For example, it can be used as a way to inject an island component from other framework. Another way is for conditional and list rendering. So this is more about documenting on how to use <slot> in that scenario. There is no need to implement <slot> from scratch or made custom functionality for certain use cases: