Skip to content

Commit 220515b

Browse files
committed
Merge branch 'master' of github.com:sveltejs/svelte
2 parents be85458 + 0eb86d2 commit 220515b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

site/content/docs/01-component-format.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ You can `export` bindings from this block, and they will become exports of the c
176176

177177
You cannot `export default`, since the default export is the component itself.
178178

179+
> Variables defined in `module` scripts are not reactive — reassigning them will not trigger a rerender even though the variable itself will update. For values shared between multiple components, consider using a [store](https://svelte.dev/docs#svelte_store).
180+
179181
```html
180182
<script context="module">
181183
let totalComponents = 0;

site/content/docs/02-template-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ The `{@debug}` tag without any arguments will insert a `debugger` statement that
354354
As well as attributes, elements can have *directives*, which control the element's behaviour in some way.
355355

356356

357-
#### [on:*eventname*](on_component_event)
357+
#### [on:*eventname*](on_element_event)
358358

359359
```sv
360360
on:eventname={handler}

0 commit comments

Comments
 (0)