3 ms·
Would you consider adding a way to set tag names in a component dynamically? I’ve found that to be incredibly useful in React, when you want to encapsulate som
by tobr 8y ago
Would you consider adding a way to set tag names in a component dynamically? I’ve found that to be incredibly useful in React, when you want to encapsulate some behavior but use it in different semantic contexts across an app.
Or is it possible already somehow? I tried to use
<svelte:component this={“h1”} ...
but it doesn’t appear to support strings, just Svelte components?
- rich_harris 8y agoJust components for now, but we have an issue for it: https://github.com/sveltejs/svelte/issues/2324 https://github.com/sveltejs/svelte/issues/2324