Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Commitdcb50a0

Browse files
author
Rich Harris
committed
add note
1 parentd52201b commitdcb50a0

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‎

Lines changed: 2 additions & 0 deletions
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)

[8]ページ先頭

©2009-2025 Movatter.jp