Comments (3)
This definitely looks like a bug. My hunch — can't check right now — is that it's caused by this effect_active()
check:
We should probably just always run this logic, even if we're getting the value in a non-reactive context (i.e. during component init)
from svelte.
Note that you only have reactivity in App
because it's not in runes mode.
REPL with mode set
I think this might be as intended. The proxy is only applied at the root.
Generally when destructuring from something stateful, one should use $derived
.
const { settings } = $derived(context);
This then also works for primitives:
const { settings: { showInRgb } } = $derived(context);
from svelte.
Related Issues (20)
- Regression: Silence ownership warning for object class fields HOT 4
- [Error] undefined is not an object (evaluating 'if_block.p') HOT 1
- Svelte 5: $derived doesn't update if $state is created and read outside of a reactive context
- Support for XML serialization of HTML5 HOT 1
- Parenthesized sequences not allowed in element attributes
- Svelte 5: svelte:element with its `this` set to `input` or `textarea` doesn't call their actions HOT 8
- Svelte 5: Classes after dynamic expression in class attribute lost in SSR HOT 2
- Svelte 5 doesn't produce the last tween value in transitions
- Svelte 5: `<script>` tag doesn't load conditionally
- Svelte 5: Misleading error message "Cannot reassign or bind to each block argument in runes mode." HOT 2
- Svelte 5: event handler doesn't get passed when passing all spread props HOT 2
- Svelte 5: Bug - ReferenceError occurs when defining a snippet inside a script along with bind:value in SSR mode. HOT 2
- Hub of all components? HOT 1
- The input element should include `camera` as a possible argument for the `capture` attribute HOT 2
- Svelte 5: Function calls in markup not being memoized when located in adjacent text nodes HOT 1
- Svelte 5 - $dervied causes svelte-check errors that do not occur with $derived.by HOT 4
- svelte:head rendering problem with 5:Runes HOT 1
- Unexpected rendering of some markdown content (documentation, blog) HOT 1
- Reactivity not working on ios safari HOT 1
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.