You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{#each things as thing}
<svelte:boundary>
{@const x = someComplexFunction(thing)}
But I get this error:
`{@const}` must be the immediate child of `{#snippet}`, `{#if}`, `{:else if}`, `{:else}`, `{#each}`, `{:then}`, `{:catch}`, `<svelte:fragment>` or `<Component>`
https://svelte.dev/e/const_tag_invalid_placementsvelte(const_tag_invalid_placement)
I generally get understand the restrictions on @const, but being able to use it inside an error boundary seems appropriate as someComplexFunction may fail.
Describe the proposed solution
It should be possible to use @const inside a svelte:boundary
Importance
would make my life easier
The text was updated successfully, but these errors were encountered:
Describe the problem
I'd like to be able to write some code like this:
But I get this error:
I generally get understand the restrictions on
@const
, but being able to use it inside an error boundary seems appropriate assomeComplexFunction
may fail.Describe the proposed solution
It should be possible to use
@const
inside asvelte:boundary
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: