Skip to content

Svelte 5: Interop bug with $effect and $ugar syntax of writable stores ... or nah? #10472

@svelte-kit-so-good

Description

@svelte-kit-so-good

Describe the bug

The $ugar store syntax throws an infinite loop bug, whereas the universal syntax continues working. Given that stores will be around for at least Svelte 5, I wonder if this should be considered a bug?

	$effect(() => {
		/* 👌 bueno */
		test_store.update(store => {
			return {...store, id:counter}
		})

		/* 🪲 no bueno */
		// $test_store.id = counter
	})

Present since alpha 18 (discord chat); and re-surfaced in discord chat with Leftium in regards to SuperForms library

Reproduction

REPL

Logs

No response

System Info

Svelte v5.0.0-next.53

but present since alpha 18

Severity

annoyance

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions