Loading...
Loading...
Implement Svelte 5 runes correctly. Use for reactive state, props, effects, $state.raw, $derived.by, $props, and $bindable.
npx skill4agent add spences10/skills svelte-runes$props()$bindable()$derived()$effect()$state()const$state.raw<script>
let count = $state(0); // Mutable state
const doubled = $derived(count * 2); // Computed (const = read-only)
$effect(() => {
console.log(`Count is ${count}`); // Side effect
});
</script>
<button onclick={() => count++}>
{count} (doubled: {doubled})
</button>Forand other template directives, see the svelte-template-directives skill.@attach
onclick{@render children()}$derivedconstcreateContextsetContextgetContext$inspect.trace$derived.by$effectif (browser)