-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
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
Binding to store values from multiple components causes multiple updates for same value #3180
Comments
Updated to latest Svelte. Still an issue it seems. |
@antony, Not saying thumbs up because it still happens (lol), I'm trying to mark issues that need attention and see if I can detect it using the API. |
Fixed in 3.24.1 - https://svelte.dev/repl/0a55c906240a46b3807f4135e7ff7c64?version=3.24.1 |
I am at "svelte": "^3.29.7" and this problem still occurs. When i roll back to 3.24.1 the problem is still there too. In my case I am bound to store 3 times like this: And manualy subscribed update happens exactly 3 times more, than it should. If I remove this bind, everything works as it should. |
I didn't know exactly how to describe this one, but it seems like if you bind to a store from more than one component, any manual subscriptions fire more than once for each update.
https://svelte.dev/repl/0a55c906240a46b3807f4135e7ff7c64?version=3.16.4
You will notice in the REPL, that you receive console log messages (or you can look at the "updated" count) to see the problem.
Binding automatically (using $) does not have the same problem.
The text was updated successfully, but these errors were encountered: