Skip to content

Commit dcb50a0

Browse files
author
Rich Harris
committed
add note
1 parent d52201b commit dcb50a0

File tree

1 file changed

+2
-0
lines changed
  • content/tutorial/01-svelte/07-lifecycle/01-onmount

1 file changed

+2
-0
lines changed

content/tutorial/01-svelte/07-lifecycle/01-onmount/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Then, add a function that runs when the component mounts:
3434
</script>
3535
```
3636

37+
> In a [later exercise](bind-this), we'll learn how to get an element reference without using `document.querySelector`.
38+
3739
So far so good — you should see gently undulating colours in the shape of the Svelte logo. But there's one problem — the loop will continue even after the component has been destroyed. To fix that, we need to return a cleanup function from `onMount`:
3840

3941
```js

0 commit comments

Comments
 (0)