Skip to content

Conversation

@trueadm
Copy link
Contributor

@trueadm trueadm commented Feb 19, 2024

Fixes #10505

@changeset-bot
Copy link

changeset-bot bot commented Feb 19, 2024

🦋 Changeset detected

Latest commit: 0694c7e

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

import { log } from './log';

const storeCount = writable(0)
let count = $state(0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why make this state, only to untrack it? Couldn't we just do let count = 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't really have any bearing on this test (which I just copied from the repl).

@Rich-Harris Rich-Harris mentioned this pull request Feb 19, 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.

Svelte 5: stores cause $effect run twice on initial load

3 participants