You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With mobx v2.4.4 this.state.title is of type ObservableValue so I can attach some observers. But with mobx v2.5.0 this.state.title is not an observable value anymore.
mobx.observable(<scalar_value>) still returns an ObservableValue instance but it behaves differently if I use it inside of mobx.extendObservable.
Ah this is a bug indeed I think, introduced here (the idea was that this is consistent with computed, but that is actually another use case, and getters are now the idiomatic way). I'll revert the behavior.
Hello,
I have a store with a state object inside of it. I want to extend the state with some observable primitive values.
With mobx v2.4.4
this.state.title
is of type ObservableValue so I can attach some observers. But with mobx v2.5.0this.state.title
is not an observable value anymore.mobx.observable(<scalar_value>) still returns an ObservableValue instance but it behaves differently if I use it inside of mobx.extendObservable.
Here is an example with mobx v.2.4.4: https://jsfiddle.net/ppetrov/emrLLhk7/
EDIT: mobx v2.5.0 example: https://jsfiddle.net/ppetrov/4wocz8y4/
The text was updated successfully, but these errors were encountered: