UPDATE – Simple Responsive Portfolio Svelte
Refactored the code in the Simple Responsive Portfolio Svelte to use updated Svelte 5 syntax for state and props.
Svelte 5 Syntax
Svelte 5 retired the prior export syntax. Before, the parent would establish state with a let variable declaration:
let variableName = true;
A child component could then receive it with an export statement:
export let variableName;
The new syntax for establishing state and passing props uses runes. Components establishing mutable state use the $state() rune.
let {variableName} = $state(true);
Components on the receiving end can use the $props() rune.
let {variableName} = $props();