We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
see this repl
<script> let obj = {}; function objToState() { console.log('objToState') state.bool = obj.bool } let state = {}; function stateToObj() { console.log('stateToObj') obj.bool = state.bool } $: obj && objToState() $: state && stateToObj() // $: obj && objToState() </script> <input type="checkbox" bind:checked="{state.bool}" /><br> <input type="checkbox" bind:checked="{obj.bool}" /><br>
If I click the stateToObj checkbox, I see this in the console:
"stateToObj" "objToState"
It is correct
But if I click the stateToObj checkbox, I see only this:
"objToState"
It is incorrect, I expect to see the same log
It turns out that in order to implement two way binding of obj with state, I need to add another line (which is now commented)
obj
state
Information about your Svelte project:
Your browser and the version: Chrome 88
Your operating system: Windows 7
Svelte version: 3.32.3
The text was updated successfully, but these errors were encountered:
This is intended behavior. See my explanation in #5848.
Sorry, something went wrong.
No branches or pull requests
see this repl
If I click the stateToObj checkbox, I see this in the console:
It is correct
But if I click the stateToObj checkbox, I see only this:
It is incorrect, I expect to see the same log
It turns out that in order to implement two way binding of
obj
withstate
, I need to add another line (which is now commented)Information about your Svelte project:
Your browser and the version: Chrome 88
Your operating system: Windows 7
Svelte version: 3.32.3
The text was updated successfully, but these errors were encountered: