Skip to content

Conversation

@trueadm
Copy link
Contributor

@trueadm trueadm commented Oct 29, 2024

Closes #14010. Whilst reading the store value with a console.log isn't guaranteed to be the latest value (as stores are subscriptions and effects run on microtasks) the template should definitely eventually get in sync, and from the example, it doesn't on initial render. This PR fixes that by checking if intermittent value changes during subscription.

@changeset-bot
Copy link

changeset-bot bot commented Oct 29, 2024

🦋 Changeset detected

Latest commit: fcec745

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 29, 2024

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

commit: fcec745

@trueadm trueadm merged commit 435a9c1 into main Oct 30, 2024
10 checks passed
@trueadm trueadm deleted the toStore-fix branch October 30, 2024 11:02
@github-actions github-actions bot mentioned this pull request Oct 30, 2024
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.

store value is not displayed after update when created via toStore()

3 participants