Hey! Doesn't seem like an urgent fix but...
This does not work properly (or at least not as I expected):
<div :webc:is="'my-component'" @test="Dynamic comp name does not pass props"></div>
The component renders but the test prop is not passed.
The workaround is probably to use a script.
<script webc:type="js">
`<${"my-component"} @test="Template string comp name works"></${"my-component"}>`
+ // OR
`<div webc:is="${"my-component"}" @test="Template string comp name works"></div>`;
</script>
Both work as expected.
My use case was the following:
I wanted to loop over an array of data with each entry containing the name of the component to be used and the props to be passed to said component.
I was trying something like this:
<div
webc:for="block of blocks"
:webc:is="block.tag"
@attributes="block"
></div>
It looks super neat and compact! (but it does not work 😭😄)
Hey! Doesn't seem like an urgent fix but...
This does not work properly (or at least not as I expected):
The component renders but the
testprop is not passed.The workaround is probably to use a script.
Both work as expected.
My use case was the following:
I wanted to loop over an array of data with each entry containing the name of the component to be used and the props to be passed to said component.
I was trying something like this:
It looks super neat and compact! (but it does not work 😭😄)