-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Is your feature request related to a problem? Please describe.
Updating a key in an object results in re-firing all reactivity associated with that object, even if the associated reactivity did not specifically reference the specific key in the object that was changed. Any update to an object, even if the exact same data currently in the object, will also cause a re-fire. This does not happen with basic variables.
Describe the solution you'd like
Only fire reactivity associated with the specific key that specific key is updated.
Describe alternatives you've considered
Have tried to develop a custom store to handle surgical updates, but currently cannot determine a valid method.
How important is this feature to you?
Rather important. I need to maintain state sync between multiple clients and the server and passing it back and forth as an object would make things much more straightforward. Currently resorting to using basic variables.
Additional context
REPL demonstrating object reactivity behavior vs standard variable.
https://svelte.dev/repl/8661837c43214b0e941661ab7eebac1d?version=3.19.2
Other
I may have a fundamental mis-understanding on how the reactivity works and what is possible. That said, I really like the way it feels to write Svelte and the object reactivity behavior currently feels counter-intuitive.