svelte
svelte copied to clipboard
Multiple variabels in `{#key}`
Describe the problem
I want to use multiple variables in a {#key variable}
like this:
Describe the proposed solution
{#key variable1, variable2, variable3}
...
{/key}
Alternatives considered
I have four variables that I want to use in key
blocks.
So what I have done right now is this:
{#key variable1}
{#key variable2}
{#key variable3}
{#key variable4}
....
{/key}
{/key}
{/key}
{/key}
Importance
nice to have
~This already works. If not, please provide a REPL. Using the comma operator turns (variable1, variable2, variable3)
into a single expression and the block should update when the expression (any of the variables) changes.~
I'm sorry, I was confused. See the linked issue below.
Also https://github.com/sveltejs/svelte/issues/7793
Your REPL in that issue seems interesting, we could do that until this is implemented
This seems to works with the following:
{#key [variable1, variable2, variable3]}
...
{/key}