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

MediaQuery: Uncaught (in promise) Svelte error: state_unsafe_mutation Updating state inside a derived is forbidden. If the value should not be reactive, declare it without $state #121

Closed
niemyjski opened this issue Jul 23, 2024 · 0 comments · Fixed by #122

Comments

@niemyjski
Copy link

niemyjski commented Jul 23, 2024

Describe the bug

Unable to pass media query matches to component prop. This was working and tnen I upgraded from svelte 5.0.0-next.193 to 5.0.0-next.195

Reproduction

https://svelte-5-preview.vercel.app/#H4sIAAAAAAAACo2QQU_DMAyF_4qxJrWTygaIU7cOcQcJtCPhkDXuFqlNoiTdmKr8dxTaQatduMX2y3v212Ela3KYf3SoeEOY47MxmKE_m1i4I9WeMEOnW1vGztqVVhq_YYp52RhtPXTwSkLy95bsGQJUVjeQ2FaRSFYj2VYK2nE7zBfLoV70GUlUMgVQauU8SPfC7Z62pSVSvXMBik6jqDRJG6luT1L4Qw73dw-P5muezFdMrZd_S6r1JXdiWXTXCYuG-_JALsBygxk2WshKksDc25ZC9ktoMPwHJai52hcMvWO4iccBSOXJVrwkeLPaOOj69s9ovNFTDjuta-Jq1StCPCY-aorIJ2II-WBXwMzERzofvvU43UGfLhwKmAmy8kgivZm4XKGbZhQwZRaYmtp2ozJcA_wM37tto4xuAgAA

Logs

at state_unsafe_mutation (http://localhost:5173/next/node_modules/.vite/deps/chunk-PNZBZ7D7.js?v=28b39c12:187:19)
    at set (http://localhost:5173/next/node_modules/.vite/deps/chunk-PNZBZ7D7.js?v=28b39c12:1901:5)
    at get matches (http://localhost:5173/next/node_modules/.vite/deps/runed.js?v=28b39c12:602:7)
    at get isLargeScreen (http://localhost:5173/next/src/routes/(app)/+layout.svelte?t=1721699576709:182:27)
    at http://localhost:5173/next/src/routes/(app)/(components)/layouts/Sidebar.svelte?t=1721699576709:42:47
    at update_reaction (http://localhost:5173/next/node_modules/.vite/deps/chunk-PNZBZ7D7.js?v=28b39c12:1276:23)

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
    Memory: 4.75 GB / 31.91 GB
  Binaries:
    Node: 22.5.1 - C:\Program Files\nodejs\node.EXE
    npm: 10.6.0 - ~\AppData\Roaming\npm\npm.CMD
    pnpm: 9.5.0 - C:\ProgramData\chocolatey\bin\pnpm.EXE
  Browsers:
    Edge: Chromium (126.0.2592.113)
    Internet Explorer: 11.0.22621.3527

Severity

blocking all usage of WithRunes

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 a pull request may close this issue.

1 participant