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
Cannot change object bound with bind:property when the object is reactivity.
object
bind:property
reactivity
Demo
App.svelte
<script> import Test from './Test.svelte' export const values = [1,2,3,4] $: datas = values.map(value=>({value})) $: obj = datas[0] </script> <Test bind:obj {datas}/> <button>{obj.value}</button>
Test.svelte
<script> export let datas export let obj const handleClick = (data)=>{ obj = data console.log(obj) } </script> <div> {#each datas as data} <button on:click={()=>{handleClick(data)}}>{data.value}</button> {/each} </div> <div>Test.svelte obj value is: {obj.value}</div>
No response
https://www.sveltejs.cn/repl/hello-world?version=3.38.3
blocking all usage of svelte
The text was updated successfully, but these errors were encountered:
Better not bind: a variable that is reactively declared.
bind:
See fix: https://svelte.dev/repl/a28ae2f5d22f4ffca7263a15ab5b6f1c?version=3.38.3
closing this in favor of #4933
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Cannot change
object
bound withbind:property
when theobject
isreactivity
.Reproduction
Demo
App.svelte
Test.svelte
Logs
No response
System Info
https://www.sveltejs.cn/repl/hello-world?version=3.38.3
Severity
blocking all usage of svelte
The text was updated successfully, but these errors were encountered: