Bolt icon indicating copy to clipboard operation
Bolt copied to clipboard

Refactor: Upgrade Svelte to version 5

Open kmcgurty opened this issue 1 year ago • 2 comments

Svelte 5 released about a month ago. Probably the biggest changes for this project are:

  • Reactive variables must be declared with let myVar = $state(value) instead of Svelte handling everything behind the scenes. The syntax $: is now deprecated. Instead, you use $derived or $effect combined with $state
  • The way you create props for components isn't the same (similarly, anything that uses <slot> is deprecated)

You can read the full migration guide here. I don't expect it to be very difficult, and it should work out of the box with Svelte 4 syntax. I haven't tried migrating anything - I can get to it at some point, if no one else wants to do it. It'd also be wise to avoid adding any big app features without upgrading to 5 first.

kmcgurty avatar Nov 19 '24 01:11 kmcgurty

A new version should probably be out soon. Did you want to do this before then?

Adamcake avatar Dec 02 '24 16:12 Adamcake

It's ok to wait. The upgrade won't be too hard since the project isn't that big. I think I'm going to have some time coming up over the next few weeks, I think I can get to this.

kmcgurty avatar Dec 04 '24 21:12 kmcgurty

Done in #172

Adamcake avatar Sep 28 '25 18:09 Adamcake