back

by tobr·7y ago·view on hn ↗
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?
1 comments
Just components for now, but we have an issue for it: https://github.com/sveltejs/svelte/issues/2324