Open cekvenich2 opened 3 years ago
Can you explain more what the slots feature is ? Is that a feature from a different framework. Do you have an pseudo code example of what you would like to do ?
Are you talking about the HTML5 <slot>
tag or the slot / v-slot
feature in vuejs ?
I never added slots because you don't need them. it's a concept that no one needs to learn with tonic if they understand javascript string literals.
render () {
const slotted = 'hello, world'
return this.html`
<p> ${ slotted } </p>
`
}
More succinctly, <slot>
=== ${slot}
. the slotted
variable can contain almost anything, not just primitive values, for example more html...
const slotted = this.html`
<another-component parent=${this}></another-component>
`
I like it, very nice an light.
Is there an example of using slots from a page?