8000 docs: clarify when attachments re-run by Rich-Harris · Pull Request #15927 · sveltejs/svelte · GitHub
[go: up one dir, main page]

Skip to content

docs: clarify when attachments re-run #15927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 19, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update documentation/docs/03-template-syntax/09-@attach.md
  • Loading branch information
Rich-Harris authored May 15, 2025
commit edb5774dad0fc4f1e4876a613be7eefd18c568cc
2 changes: 1 addition & 1 deletion documentation/docs/03-template-syntax/09-@attach.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: {@attach ...}

Attachments are functions that run in an [effect]($effect) when an element is mounted to the DOM or when [state]($state) read inside the function updates.

Optionally, they can return a function that is called when the element is later removed from the DOM.
Optionally, they can return a function that is called before the attachment re-runs, or when the element is later removed from the DOM.

> [!NOTE]
> Attachments are available in Svelte 5.29 and newer.
Expand Down
0