Comments (2)
I rewrote your code, but it is useless... value does nothing - maybe replace with console.log
from svelte.
I rewrote your code, but it is useless... value does nothing - maybe replace with console.log
The rewrite is incorrect, you declare a new variable inside the scope of the function, it's not the same value
from the layout, so the code run, but it has no effect in the component C.svelte
The value from a snippet instruction seem to be immutable, similar to getContext
/setContext
If it's the case, then maybe the documentation should indicate this limitation, and maybe the same workaround as getContext
So, if, instead of a simple value, a plain old store is used, then the code work as expected (as far as I understand the goal of this code) (See my version with store, I add a <fieldset>
that contains the content of value
to visualize the changes)
from svelte.
Related Issues (20)
- Svelte 5: `<img loading="lazy">` loads eagerly in Firefox (part 2) HOT 2
- Svelte 5: Class fields aren't reactive HOT 14
- Svelte 5: svelte-ignore a11y_autofocus is ignored HOT 1
- Svelte.dev suggestion: version switcher HOT 1
- Add error when a {#snippet} hide a props HOT 2
- Svelte 5: Confusing error "Error: get is not a function or its return value is not iterable" HOT 4
- Critial: static analyze some.svelte.ts HOT 3
- Hooks to manipulate the Svelte compiler HOT 5
- Svelte 5: svelte-ignore unknown/legacy code warnings are misplaced
- `state_referenced_locally` warning should skip type declarations
- Transitions not working properly in Svelte 5. HOT 2
- Svelte 5: `<select>`/`<option>` elements get incorrect/inconsistent values when applying `undefined` with spread or reactive value
- playground: console formatting isn't applied HOT 2
- Svelte 5: Setting the `loading` property for `img` in the `$effect` rune does not work HOT 2
- Svelte 5: Throw an error when importing svelte/internal/* HOT 3
- Binding scrollY to `svelte:window` causes implicit scrolling to the top of the page HOT 6
- Object literal may only specify known properties, and '"on:accept"' does not exist in type 'Omit<HTMLInputAttributes, keyof HTMLAttributes<any>> & HTMLAttributes<any>'. HOT 3
- Svelte 5 playground is freezing HOT 2
- Binding to store values not working correctly in Svelte 5 HOT 4
- Remove `indeterminate` from `HTMLInputAttributes` type 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.