Replies: 1 comment 1 reply
-
Did you update your compiler settings according to the migration guide? Can
you provide a minimal repro?
…On Tue, 1 Dec 2020, 00:03 alisman, ***@***.***> wrote:
In trying to upgrade Mobx 4 to 6, we just spent a few hours debugging a
situation where we han observable decorator on an un-assigned class
property. This curiously caused action.bound decorator to fail on an
unrelated method! I understand we are kind of asking for trouble by
continuing to use the now marginalized decorators (true/false?) but our
code base is so dependent on them and we also really like them. But anyhow,
i think there used to be an error message when you left an observable
undefined? Anyway we can catch this so we don't run into it again?
`
class something {
// leaving this un-assigned is illegal and strangely breaks the action.bound below
// must be something with the way decorators are now handled
@observable someVar;
@action.bound doSomething(){
// this is not bound due to the un-assigned property
}
}
`
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2655>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN4NBC2EN2DTQAROGOOOCDSSQXGNANCNFSM4UIIPKQQ>
.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In trying to upgrade Mobx 4 to 6, we just spent a few hours debugging a situation where we han observable decorator on an un-assigned class property. This curiously caused action.bound decorator to fail on an unrelated method! I understand we are kind of asking for trouble by continuing to use the now marginalized decorators (true/false?) but our code base is so dependent on them and we also really like them. But anyhow, i think there used to be an error message when you left an observable undefined? Anyway we can catch this so we don't run into it again?
Beta Was this translation helpful? Give feedback.
All reactions