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
I'm trying to follow the documentation but in 3 places it says 3 different things about configuring decorators. Can you tell me how to do it in a MobX 7 compatible way?
So far I did:
overwrite @babel/core resolution to latest 7.x
"resolutions": {
"@babel/core": "7.x"
},
Add this to my config-overrides.js for customize-cra:
Interestingly I didn't find @babel/plugin-transform-class-static-block in MobX docs anywhere, but it was asking for it. I found one package by Google, called mobx-mc which had this config: https://github.com/rakenapp/mobx-mc/blob/master/.babelrc
After changing everything to accessor, now it's terminating with, which I couldn't solve yet.
Parsing error: This experimental syntax requires enabling the parser plugin: "decoratorAutoAccessors".=
Also, about the accessors, I don't understand what happens with @observable.ref and observable.map and observable.array. Does @observable.ref accessor work?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm trying to follow the documentation but in 3 places it says 3 different things about configuring decorators. Can you tell me how to do it in a MobX 7 compatible way?
So far I did:
Interestingly I didn't find
@babel/plugin-transform-class-static-block
in MobX docs anywhere, but it was asking for it. I found one package by Google, called mobx-mc which had this config: https://github.com/rakenapp/mobx-mc/blob/master/.babelrcAfter changing everything to accessor, now it's terminating with, which I couldn't solve yet.
Also, about the accessors, I don't understand what happens with
@observable.ref
andobservable.map
andobservable.array
. Does@observable.ref accessor
work?Beta Was this translation helpful? Give feedback.
All reactions