Comments (6)
Bindable works by checking if the object property is an accessor with a setter. In this case, it is not. If you make it so this is the case:
mount(Component, {target: document.body, props: {
get count() {
return props.count;
},
set count(v) {
props.count = v;
}
}});
Then you have two-way bindings working outside.
from svelte.
I thought this is what proxied $state already did for you? (Assuming
props
is an object)
This is about props, not state. So no, it doesn't do this for you.
from svelte.
Should count
be bindable()
?
from svelte.
Should count be bindable()?
This does not fix it sadly: https://github.com/Hugos68/svelte-5-main--effect.root-not-working
from svelte.
I thought this is what proxied $state already did for you? (Assuming props
is an object)
from svelte.
Thanks for the easy solution. I will mark this as closed
from svelte.
Related Issues (20)
- Svelte 5: $state declared with var in *.svelte.js broken HOT 2
- Svelte 5: `$bindable()` type is unknown HOT 3
- Runes mode: cannot send data from child to parent HOT 2
- [runes] Add the ability to get a list of dependencies
- Disallow prop interpolation + other stuff without quotes? HOT 5
- don't appear the result HOT 3
- Hydration regression between 224 and 225 HOT 6
- Support Composability on Runes HOT 13
- Svelte 5: binding to universal reactivity objects HOT 3
- Custom root folder destroys hmr css update (svelte + vite + ubuntu) HOT 2
- Error on invalid tag names
- webcomponents regression after 221 HOT 1
- Svelte 5: `$state.link` various bugs HOT 5
- Shadowed variable breaks `{#await}` block HOT 3
- Svelte 5: An empty string in `@html` causes a warning during hydration. HOT 1
- Introduce `$state.from` rune HOT 3
- `<script module lang="ts">` followed by `<script lang="ts">` is a syntax error HOT 2
- Can't delete property from `$$restProps` twice
- Saner syntax for attributes
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.