From c3c09480fbc49f4889b9f770004ec41004081dbc Mon Sep 17 00:00:00 2001 From: Leonard Lesinski Date: Sat, 16 Aug 2025 12:49:02 +0200 Subject: [PATCH] fix: updated to Svelte 5 syntax with runes See https://svelte.dev/docs/svelte/v5-migration-guide --- source/_posts/svelte.md | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/source/_posts/svelte.md b/source/_posts/svelte.md index a4534bc..4af615b 100644 --- a/source/_posts/svelte.md +++ b/source/_posts/svelte.md @@ -1,6 +1,6 @@ --- title: Svelte -date: 2025-04-08 19:45:00 +date: 2025-08-16 10:30:00 background: bg-[#FF3E00] tags: - svelte @@ -87,7 +87,7 @@ Note: Svelte components must always return a root element or content. ```js
@@ -127,8 +127,7 @@ Note: External components should be installed via npm first. ```js

{firstName} {lastName} is {age}.

@@ -164,7 +161,7 @@ Note: External components should be installed via npm first. ```js

{name}

- + ``` ## Events {.cols-1} @@ -187,12 +184,12 @@ Note: External components should be installed via npm first. } - + Say Hi ``` -Note: The most common event listeners are `on:click` and `on:submit`. +Note: The most common event listeners are `onclick` and `onsubmit`. ## Loops {.cols-2} @@ -236,8 +233,8 @@ Note: The most common event listeners are `on:click` and `on:submit`. ```js -
+ @@ -274,7 +271,7 @@ Note: The most common event listeners are `on:click` and `on:submit`.

{sum}

@@ -402,14 +399,17 @@ export const time = readable(new Date(), function start(set) { ### Reactive Statements with Side Effects ```js - + ``` ### Bind to DOM Properties ```js