Skip to content
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

[docs] update warning message for state_referenced_locally #15171

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/svelte/src/compiler/warnings.js
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ export function reactive_declaration_module_script_dependency(node) {
* @param {null | NodeLike} node
*/
export function state_referenced_locally(node) {
w(node, 'state_referenced_locally', `State referenced in its own scope will never update. Did you mean to reference it inside a closure?\nhttps://svelte.dev/e/state_referenced_locally`);
w(node, 'state_referenced_locally', `This state is not reactive. Did you mean to reference it inside a closure?\nhttps://svelte.dev/e/state_referenced_locally`);
}

/**
Expand Down Expand Up @@ -810,4 +810,4 @@ export function svelte_element_invalid_this(node) {
*/
export function svelte_self_deprecated(node, name, basename) {
w(node, 'svelte_self_deprecated', `\`<svelte:self>\` is deprecated — use self-imports (e.g. \`import ${name} from './${basename}'\`) instead\nhttps://svelte.dev/e/svelte_self_deprecated`);
}
}
Loading