Skip to content

Commit 0be535c

Browse files
Sync svelte docs (#991)
sync svelte docs Co-authored-by: Rich-Harris <1162160+Rich-Harris@users.noreply.github.com>
1 parent 14edd76 commit 0be535c

File tree

2 files changed

+0
-80
lines changed

2 files changed

+0
-80
lines changed

apps/svelte.dev/content/docs/svelte/98-reference/.generated/client-warnings.md

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -204,46 +204,6 @@ Consider the following code:
204204
205205
To fix it, either create callback props to communicate changes, or mark `person` as [`$bindable`]($bindable).
206206
207-
### reactive_declaration_non_reactive_property
208-
209-
```
210-
A `$:` statement (%location%) read reactive state that was not visible to the compiler. Updates to this state will not cause the statement to re-run. The behaviour of this code will change if you migrate it to runes mode
211-
```
212-
213-
In legacy mode, a `$:` [reactive statement](https://svelte.dev/docs/svelte/legacy-reactive-assignments) re-runs when the state it _references_ changes. This is determined at compile time, by analysing the code.
214-
215-
In runes mode, effects and deriveds re-run when there are changes to the values that are read during the function's _execution_.
216-
217-
Often, the result is the same — for example these can be considered equivalent:
218-
219-
```js
220-
let a = 1, b = 2, sum = 3;
221-
// ---cut---
222-
$: sum = a + b;
223-
```
224-
225-
```js
226-
let a = 1, b = 2;
227-
// ---cut---
228-
const sum = $derived(a + b);
229-
```
230-
231-
In some cases — such as the one that triggered the above warning — they are _not_ the same:
232-
233-
```js
234-
let a = 1, b = 2, sum = 3;
235-
// ---cut---
236-
const add = () => a + b;
237-
238-
// the compiler can't 'see' that `sum` depends on `a` and `b`, but
239-
// they _would_ be read while executing the `$derived` version
240-
$: sum = add();
241-
```
242-
243-
Similarly, reactive properties of [deep state](https://svelte.dev/docs/svelte/$state#Deep-state) are not visible to the compiler. As such, changes to these properties will cause effects and deriveds to re-run but will _not_ cause `$:` statements to re-run.
244-
245-
When you [migrate this component](https://svelte.dev/docs/svelte/v5-migration-guide) to runes mode, the behaviour will change accordingly.
246-
247207
### state_proxy_equality_mismatch
248208
249209
```

apps/svelte.dev/content/docs/svelte/98-reference/30-runtime-warnings.md

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -211,46 +211,6 @@ Consider the following code:
211211
212212
To fix it, either create callback props to communicate changes, or mark `person` as [`$bindable`]($bindable).
213213
214-
### reactive_declaration_non_reactive_property
215-
216-
```
217-
A `$:` statement (%location%) read reactive state that was not visible to the compiler. Updates to this state will not cause the statement to re-run. The behaviour of this code will change if you migrate it to runes mode
218-
```
219-
220-
In legacy mode, a `$:` [reactive statement](https://svelte.dev/docs/svelte/legacy-reactive-assignments) re-runs when the state it _references_ changes. This is determined at compile time, by analysing the code.
221-
222-
In runes mode, effects and deriveds re-run when there are changes to the values that are read during the function's _execution_.
223-
224-
Often, the result is the same — for example these can be considered equivalent:
225-
226-
```js
227-
let a = 1, b = 2, sum = 3;
228-
// ---cut---
229-
$: sum = a + b;
230-
```
231-
232-
```js
233-
let a = 1, b = 2;
234-
// ---cut---
235-
const sum = $derived(a + b);
236-
```
237-
238-
In some cases — such as the one that triggered the above warning — they are _not_ the same:
239-
240-
```js
241-
let a = 1, b = 2, sum = 3;
242-
// ---cut---
243-
const add = () => a + b;
244-
245-
// the compiler can't 'see' that `sum` depends on `a` and `b`, but
246-
// they _would_ be read while executing the `$derived` version
247-
$: sum = add();
248-
```
249-
250-
Similarly, reactive properties of [deep state](https://svelte.dev/docs/svelte/$state#Deep-state) are not visible to the compiler. As such, changes to these properties will cause effects and deriveds to re-run but will _not_ cause `$:` statements to re-run.
251-
252-
When you [migrate this component](https://svelte.dev/docs/svelte/v5-migration-guide) to runes mode, the behaviour will change accordingly.
253-
254214
### state_proxy_equality_mismatch
255215
256216
```

0 commit comments

Comments
 (0)