-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Not able to work with Mobx when including "reflect-metadata" library in typescript project #2416
Comments
Please setup a reproduction. We can't help you without any code. |
This is the code on my server which renders an view and sends it to the client. Inorder to make the controller in such a way I have used reflect-meta library to use decorator. The view that it renders is
Now since the view also uses the same decorator pattern I think this is causing some issue. I have also seen this in the docs that Mobx has some issue when used along side "reflect-metadata" lib. This is the error that I am getting
|
Duplicate mobxjs/mobx-react#756 TL;DR There isn't much we can do about it, so closing. |
I am using an express server where I am using relfect meta data to wrap my controllers.
The controllers render a react component that has components with mobx decorators. When using mobx decorators with reflect meta data I am getting this error.
TypeError: at DecorateConstructor (/Users/thebedroomprogrammer/code/src/code.gamezop.io/Gamezop/peach/node_modules/reflect-metadata/Reflect.js:544:31) at Object.decorate (/Users/thebedroomprogrammer/code/src/code.gamezop.io/Gamezop/peach/node_modules/reflect-metadata/Reflect.js:130:24) at __decorate (/Users/thebedroomprogrammer/code/src/code.gamezop.io/Gamezop/peach/ui/src/v2/components/ToastNotification/index.tsx:4:92) at Object.<anonymous> (/Users/thebedroomprogrammer/code/src/code.gamezop.io/Gamezop/peach/ui/src/v2/components/ToastNotification/index.tsx:16:24) at Module._compile (internal/modules/cjs/loader.js:776:30) at Module.m._compile (/Users/thebedroomprogrammer/code/src/code.gamezop.io/Gamezop/peach/node_modules/ts-node/src/index.ts:858:23) at Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Object.require.extensions.(anonymous function) [as .tsx] (/Users/thebedroomprogrammer/code/src/code.gamezop.io/Gamezop/peach/node_modules/ts-node/src/index.ts:861:12) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
The text was updated successfully, but these errors were encountered: