-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model, created in itself static method, doesn't work properly when using legacy decorators transpiled by babel #173
Comments
I think it is this babel decorator plugin bug: babel/babel#11131 |
Also related: #122 |
Yep, definitely it's babel bug. Currently i use external method and assign it into static property static foo = foo Can we fix this babel bug? I'll try to look into this. |
If you were to fix the babel plugin that'd be awesome :) Not much that can be done on the mobx-keystone repo sadly |
Uh-oh, so I fixed plugin, but not pushed it yet. |
That's awesome! Let's hope it gets merged soon 👍 |
Workarounds in that issue aren't very appealing. I think we'll just avoid static methods for now. |
womp womp - is this still an issue? |
It never got fixed by babel, so yes. I don't know if it happens with the new (non legacy) decorators though. |
https://codesandbox.io/s/mobx-keystone-static-method-problem-4thb2?file=/src/index.tsx
I think it's coupled with babel, because I cannot reproduce it in pure ts tests. Possible related #18 #92
The text was updated successfully, but these errors were encountered: