-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
.volatile() deprecation issues #18011
Comments
This deprecation cannot be reverted, we're moving away from computed properties in general and bringing them inline with standard native getters and this is part of that process. In the first case, that is unfortunate. You can use the class A extends Component {
get foo() {
return { foo: true };
}
}
class B extends A {
get foo() {
let obj = super.foo;
obj.bar = 123;
return obj;
}
} Since native classes will be the default by the time we remove For the second case, that doesn't really make sense. Adding a dependent key to a volatile computed does nothing, since the computed only recomputes when it is accessed, and recomputes every time it is accessed, so dependent keys do nothing (this should actually probably throw an error tbh). I'm not sure what you mean by the third case, can you provide an example? |
A quick comment: It is a bit convoluted but the second case does do something. It triggers any I'll get back to you on the other points. |
@kanongil actually, it shouldn't. For reference, this is where a computed will normally trigger property notifications. We short circuit in volatile computeds here and never notify. |
I'm doing some issue gardening 🌱🌿 🌷 and came upon this issue. Since it's quite old I just wanted to ask if this is still relevant? If it isn't, maybe we can close this issue? By closing some old issues we reduce the list of open issues to a more manageable set. |
|
This issue is exactly about problems with the deprecation, and should be even more relevant given that you can no longer fall back to it. |
As far as I can tell:
|
Opening this, since my comments in #17709 (comment) seems to have been ignored.
I have 3 use cases that aren't covered by the deprecation guide.
Case 1: Class extend inheritance
Case 2: Relying on dependent properties
Example:
Case 3
The final case is for an internal addon, which exposes a
ComputedProperty
instance that needs to be able to call the _getter on allget()
calls. This case fundamentally clashes with the deprecation.Any chance that the deprecation can be reverted?
The text was updated successfully, but these errors were encountered: