Skip to content

Conversation

@jamesscottbrown
Copy link
Contributor

@jamesscottbrown jamesscottbrown commented May 21, 2025

This mentions that a Svelte action can return an object with an update method.

Without this it's easy for someone who hasn't read the corresponding Reference page to mis-interpret the previous sentence as meaning that there is no mechanism for automatically re-running or updating actions when arguments change.

Preview of the edited page: https://svelte-dev-git-preview-svelte-15977-svelte.vercel.app/docs/svelte/use

@changeset-bot
Copy link

changeset-bot bot commented May 21, 2025

⚠️ No Changeset found

Latest commit: 61474e7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@svelte-docs-bot
Copy link

@MotionlessTrain
Copy link
Contributor

Doesn’t the sentence just below this also mention the update method?
When using an $effect, the update method is not needed, as the effect would rerun when one of its dependencies change, which is probably why the update method is only mentioned in the legacy part

@jamesscottbrown
Copy link
Contributor Author

Doesn’t the sentence just below this also mention the update method?

That's true - I initially missed this sentence as it was in a "legacy mode" box, and I had collapsed these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants