Comments (3)
This isn't mutation, it's reassignment. You can't reassign to identifiers imported from another module. This is how JS works, and isn't specific to Svelte.
from svelte.
Yes, this is intended. You can do this with less boilerplate by doing
export const selectedDateCtrl = $state({ selectedDate: new Date() })
from svelte.
thank you @Conduitry and @dummdidumm
i guessed it might be intended but wasn't 100% sure
from svelte.
Related Issues (20)
- Calculated CSS unit HOT 2
- `read_pattern` fails if brackets are in strings etc HOT 2
- Expose `set_raf` in Svelte 5 HOT 1
- Svelte 5 Next 164: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory HOT 1
- [email protected] breaks snippets with arguments typed as an object literal HOT 11
- setTimeout does not rerender component when using lifecycle functions HOT 1
- [ Svelte 5 + SortableJS ] Cannot read properties of null (reading 'nextSibling') since 5.0.0-next.162 HOT 1
- Whitespaces are not preserved in non-`pre` tags, even with `white-space; pre;` on. HOT 2
- $effect fails in some cases HOT 3
- Svelte 5: Missing warning for non-state use in `$effect`? HOT 5
- Svelte 5: compiler silently fail when snippet is not properly parsed
- Allow aria-valuetext for elements with `role="slider"`
- 🐞 FATAL ERROR (next.164): Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory HOT 2
- Svelte 5: dispatched "native named" events not reaching handler HOT 15
- What does 'Object.defineProperty called on non-object' mean in $effect? HOT 2
- Svelte 5: Discriminating Unions with Type Narrowing doesn't work HOT 3
- Svelte 5: Reintroduce `frame`/`pos`/`toString()` in compiler warnings
- Svelte 5: Placeholder in select not displayed HOT 6
- Passing stateful arrays down with getters do not work on libraries HOT 1
- Svelte 5: Whitespace before the closing brace of `{#snippet}` will throw a parse error.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte.