Skip to content

Commit dea7abb

Browse files
authored
docs(tutorial): add note on reactive statements (#382)
Note to learner that reactive statements run after script code, to complement documentation at https://svelte.dev/docs#component-format-script-3-$-marks-a-statement-as-reactive
1 parent b76ff52 commit dea7abb

File tree

1 file changed

+2
-0
lines changed
  • content/tutorial/01-svelte/02-reactivity/02-reactive-declarations

1 file changed

+2
-0
lines changed

content/tutorial/01-svelte/02-reactivity/02-reactive-declarations/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ Let's use `doubled` in our markup:
2424
```
2525

2626
Of course, you could just write `{count * 2}` in the markup instead — you don't have to use reactive values. Reactive values become particularly valuable (no pun intended) when you need to reference them multiple times, or you have values that depend on _other_ reactive values.
27+
28+
> Note that reactive declarations and statements will run after other script code and before component markup is rendered.

0 commit comments

Comments
 (0)