Skip to content

Commit 3682371

Browse files
authored
chore: doc fix (#15651)
1 parent e035e28 commit 3682371

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

documentation/docs/98-reference/.generated/client-errors.md

+2
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ This error occurs when state is updated while evaluating a `$derived`. You might
151151
This is forbidden because it introduces instability: if `<p>{count} is even: {even}</p>` is updated before `odd` is recalculated, `even` will be stale. In most cases the solution is to make everything derived:
152152

153153
```js
154+
let count = 0;
155+
// ---cut---
154156
let even = $derived(count % 2 === 0);
155157
let odd = $derived(!even);
156158
```

packages/svelte/messages/client-errors/errors.md

+2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ This error occurs when state is updated while evaluating a `$derived`. You might
107107
This is forbidden because it introduces instability: if `<p>{count} is even: {even}</p>` is updated before `odd` is recalculated, `even` will be stale. In most cases the solution is to make everything derived:
108108

109109
```js
110+
let count = 0;
111+
// ---cut---
110112
let even = $derived(count % 2 === 0);
111113
let odd = $derived(!even);
112114
```

0 commit comments

Comments
 (0)