We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “No 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? No Sign in to your account
This warning may need to be removed...
State referenced in its own scope will never update. Did you mean to reference it inside a closure?
<script> let name = $state("John"); name = "Jane"; </script> <h1>Hello {name}</h1>
This is taken directly from your examples on how to update state.
No response
System: OS: macOS 14.4 CPU: (10) arm64 Apple M1 Pro Memory: 703.05 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 21.7.0 - /opt/homebrew/bin/node Yarn: 1.22.21 - /opt/homebrew/bin/yarn npm: 10.5.0 - ~/Programming/superbuildpro/node_modules/.bin/npm bun: 1.0.30 - /opt/homebrew/bin/bun npmPackages: svelte: ^5.0.0-next.82 => 5.0.0-next.82
annoyance
The text was updated successfully, but these errors were encountered:
fix: don't warn on writes to $state
$state
b6575cc
fixes #10905
31f8fea
Successfully merging a pull request may close this issue.
Describe the bug
This warning may need to be removed...
State referenced in its own scope will never update. Did you mean to reference it inside a closure?
This is taken directly from your examples on how to update state.
Reproduction
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: