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? 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
in:
<script> $: mobile = width < 640; let width = 0; </script> <svelte:window bind:innerWidth={width} /> <p>{mobile ? 'mobile' : 'desktop'}</p>
out:
<script> let mobile = $derived(width < 640); let width = $state(0); </script> <svelte:window bind:innerWidth={width} /> <p>{mobile ? 'mobile' : 'desktop'}</p>
Note that width is referenced before its declaration. This is allowed in Svelte 4 but not in runes mode.
width
link
No response
next
annoyance
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
in:
out:
Note that
width
is referenced before its declaration. This is allowed in Svelte 4 but not in runes mode.Reproduction
link
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: