Skip to content

Reactivity on specific object properties #4711

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

Closed
cailen-fisher opened this issue Apr 23, 2020 · 1 comment
Closed

Reactivity on specific object properties #4711

cailen-fisher opened this issue Apr 23, 2020 · 1 comment

Comments

@cailen-fisher
Copy link

Is your feature request related to a problem? Please describe.
Currently, forming a reactive statement around an object property results in the same basic result as reacting to the object at the top level. Making an assignment to any property behaves as if making an assignment to the parent object.

This doesn't seem very intuitive for doing something like $: baz(obj.foo) because then obj.bar += 1 fires baz(obj.foo) even though obj.foo has not changed.

Describe the solution you'd like
The ability to build reactive statements targeting object properties that only react to that property changing via assignment, just like a regular variable.

Describe alternatives you've considered
Currently in this situation I am making an extraneous regular variable, copying the value of the object property I actually want to observe to the regular variable, and then forming the reactive statement around the regular variable.

How important is this feature to you?
Not a deal breaker, but it would be a really nice enhancement

@Conduitry
Copy link
Member

Duplicate of #4535.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants