Tip 3: Component $bindable(myFunction) props are unusable because the parent cannot bind to them (a var that starts undefined). Runtime error: "Cannot do bind:value={undefined} when `func` has a fallback value."
Solution: Remove fallback and assign to it later; add undefined| to the property type.
29.12.2024 22:24
👍 0
🔁 0
💬 0
📌 0
Tip 2: The Migration script adds this interface to each .svelte file:
interface Props {
data: any;
form: any;
}
To get error checking and auto-complete help, change it to:
import type { PageData, ActionData } from "./$types";
interface Props {
data: PageData;
form: ActionData;
}
29.12.2024 21:40
👍 2
🔁 0
💬 0
📌 0
Tip 1: For logic that has to run once after every data load, in Svelte 4 I called a function from a $: statement. Cannot do this in 5: $effect doesn't run in SSR; Outer scope warns "State referenced in its own scope..."; $derived only works for read-only data.
My solution: put such logic in +page.ts
29.12.2024 21:31
👍 1
🔁 0
💬 0
📌 0
My project has 34 .svelte files. 13 in components, 21 under routes.
Yes, around 40 hours.
I'll reply on my post about the learnings...
29.12.2024 20:35
👍 1
🔁 0
💬 0
📌 0
I finished my first upgrade of a SvelteKit project to Svelte 5. It took about a week. Slow at first until I got the hang of it. I’ll soon post a few tips I learned along the way…
29.12.2024 14:46
👍 5
🔁 0
💬 4
📌 0
Yes, I did. I still had to edit almost every .svelte file. It often got the line order wrong, destructuring data before it’s declared.
28.12.2024 14:54
👍 0
🔁 0
💬 1
📌 1
🚀 Diving headfirst into #Svelte 5! Converting one of my apps to the latest version, and I’m blown away by the speed improvements. Already made great progress, and it’s running faster than ever. ✨ Loving how Svelte keeps raising the bar for modern web development! #SvelteKit #WebDev
27.12.2024 17:10
👍 12
🔁 0
💬 2
📌 0
👋 Hello, BlueSky! I’m a programmer with 35+ years of experience, currently geeking with #Svelte. I’m passionate about accessibility (A11y), remote work, and diving into Sustainability in software design. ☕ Also powered by coffee. Excited to join the conversation here—let’s build something amazing!
27.12.2024 16:29
👍 14
🔁 0
💬 0
📌 0