@ -24,7 +24,7 @@ All three sections — script, styles and markup — are optional.
A `<script>` block contains JavaScript that runs when a component instance is created. Variables declared (or imported) at the top level are 'visible' from the component's markup. There are four additional rules:
#### 1. `export` creates a component prop
##### 1. `export` creates a component prop
---
@ -48,7 +48,7 @@ Svelte uses the `export` keyword to mark a variable declaration as a *property*
</script>
```
#### 2. Assignments are 'reactive'
##### 2. Assignments are 'reactive'
---
@ -68,7 +68,7 @@ Update expressions (`count += 1`) and property assignments (`obj.x = y`) have th
</script>
```
#### 3. `$:` marks a statement as reactive
##### 3. `$:` marks a statement as reactive
---
@ -104,7 +104,7 @@ If a statement consists entirely of an assignment to an undeclared variable, Sve
</script>
```
#### 4. Prefix stores with `$` to access their values
##### 4. Prefix stores with `$` to access their values
---
@ -190,4 +190,4 @@ To apply styles to a selector globally, use the `:global(...)` modifier.