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

Documentation: Lifecycle hooks example is wrong #15404

Open
schontz opened this issue Feb 27, 2025 · 1 comment
Open

Documentation: Lifecycle hooks example is wrong #15404

schontz opened this issue Feb 27, 2025 · 1 comment

Comments

@schontz
Copy link

schontz commented Feb 27, 2025

Describe the bug

https://github.com/sveltejs/svelte/blob/main/documentation/docs/06-runtime/03-lifecycle-hooks.md

The theme change callback, toggle is incorrect. The linked "After" code is correct, though.

Reproduction

toggleValue is undefined

Logs

System Info

n/a

Severity

annoyance

@schontz
Copy link
Author

schontz commented Feb 27, 2025

function toggle() {
toggleValue = !toggleValue;
}

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

No branches or pull requests

1 participant