I'm trying to use mobx with react native and stuck into a problem.
@inject('someStore')
@observer
export class SomeComponent extends Component {
render() {
...
}
}
I'm sure I configured properly babel plugins for decorator but @inject
decorator gives me an exception "Expected a constructor."
.
I have no idea why this happen since I had used mobx in this way in an other project. Does anyone had been through this issue?
I downgraded the mobx-react version to 5.4.4 and I can confirm that it works.
Try to downgrade mobx-react.
yarn add [email protected]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With