Update documentation/docs/02-runes/03-$derived.md

Co-authored-by: Yash Pandit <hireyashpandit@gmail.com>
docs-derived-memoized
Simon H 8 months ago committed by GitHub
parent cc4af6c98e
commit 0321db1abd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -19,7 +19,7 @@ Derived state is declared with the `$derived` rune:
The expression inside `$derived(...)` should be free of side-effects. Svelte will disallow state changes (e.g. `count++`) inside derived expressions. The expression inside `$derived(...)` should be free of side-effects. Svelte will disallow state changes (e.g. `count++`) inside derived expressions.
Subsequents results of a `$derived` expression are compared against its previous value. If they are referentially the same, the `$derived` won't propagate an update to its dependencies. Subsequent results of a `$derived` expression are compared against its previous value. If they are referentially the same, the `$derived` won't propagate an update to its dependencies.
```svelte ```svelte
<script> <script>

Loading…
Cancel
Save