Skip to content

Commit 9613843

Browse files
fix: replace $state with $derived (#13161)
1 parent 2129e0b commit 9613843

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

documentation/docs/20-core-concepts/50-state-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Instead, we need to make the value [_reactive_](/tutorial/svelte/state):
153153
/** @type {{ data: import('./$types').PageData }} */
154154
let { data } = $props();
155155
156-
+++ let wordCount = $state(data.content.split(' ').length);
156+
+++ let wordCount = $derived(data.content.split(' ').length);
157157
let estimatedReadingTime = $derived(wordCount / 250);+++
158158
</script>
159159
```

0 commit comments

Comments
 (0)