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
{{ message }}
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.
Had a hard time today figuring out why a very simple mobx react sandbox app did not work.
Turned out that the issue was due to the order of babel plugins in my .babelrc.
transform-decorators-legacy has to appear first in the list, otherwise it will break with at least either transform-function-bind or transform-class-properties plugins if they defined before it, with the wrong orders, observables are not triggered at all.
Would be great to update README to clarify this.
The text was updated successfully, but these errors were encountered:
Maybe that's something that mobx could detect/catch? (like if the class property decorator gets a function instead of an object/array ref), would be great to add a console warning if it can be safely detected.
Had a hard time today figuring out why a very simple mobx react sandbox app did not work.
Turned out that the issue was due to the order of babel plugins in my
.babelrc
.transform-decorators-legacy
has to appear first in the list, otherwise it will break with at least eithertransform-function-bind
ortransform-class-properties
plugins if they defined before it, with the wrong orders, observables are not triggered at all.Would be great to update README to clarify this.
The text was updated successfully, but these errors were encountered: