Skip to content

fix: make effects depend on state created inside them #16198

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 3 commits into from
Jun 18, 2025

Conversation

dummdidumm
Copy link
Member

@dummdidumm dummdidumm commented Jun 18, 2025

We want that behavior after all as we have realized - it's vital for thinks like a shared Resource class instance which is scaffolded within the template, shares its instance across call sites, and should still trigger reruns when something changes (which can only happen if the surrounding template will rerun upon changes). Basically a revert of #15553 for effects.

Also adds the possibility to run the suite in non-async-mode; we can use that to run a separate github action to make sure we don't accidentally regress.

merges into #16197 which in turn merges into the async branch

Copy link

changeset-bot bot commented Jun 18, 2025

⚠️ No Changeset found

Latest commit: c916754

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

Copy link
Contributor

Playground

pnpm add https://pkg.pr.new/svelte@16198

@Rich-Harris Rich-Harris merged commit 7486eab into async-merge-main Jun 18, 2025
12 checks passed
@Rich-Harris Rich-Harris deleted the effects-local-state-rerun branch June 18, 2025 15:11
Rich-Harris pushed a commit that referenced this pull request Jun 18, 2025
* chore: merge main into async branch

* adjust test

* fix: make effects depend on state created inside them (#16198)

* make effects depend on state created inside them

* fix, add github action

* disable test in async mode
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