-
Hi everyone
above everything is ok, but i want to decorate my model with additional fields, like this:
My question is, how can i decorate a class with new annotations, and make them observable or not, depends of my task? Thanks a lot |
Beta Was this translation helpful? Give feedback.
Answered by
urugator
May 18, 2022
Replies: 1 comment 8 replies
-
I think both of these should work super(...args);
Reflect.defineProperty(this, 'test', { value: { foo: '', bar: '' }, enumerable: false })
makeObservable(this, { 'test': true }) or super(...args);
extendObservable(this, { test: { foo: '', bar: '' } }) |
Beta Was this translation helpful? Give feedback.
8 replies
Answer selected by
kubk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think both of these should work
or