svelte: Svelte 5: Undocumented breaking changes

Describe the bug

There are a number of breaking changes that have not made their way into the official list of breaking changes yet. I’m creating this issue to track them. Maintainers: Edit this post as we come across new ones, and check them off as we have PRs documenting them.

Reproduction

https://svelte-5-preview.vercel.app/docs/breaking-changes

Logs

No response

System Info

-

Severity

annoyance

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 22 (14 by maintainers)

Commits related to this issue

Most upvoted comments

bind:value is just syntactic sugar for {value} oninput={(e) => value = e.currentTarget.value}. So your example becomes this

<script>
  let name = $state('world');
</script>

<h1>Hello {name}!</h1>

<input
  value={name}
  oninput={(e) => {
    console.log('Old value:', name);
    name = e.currentTarget.value;
    console.log('New value:', name);
  }}
>