hermes: Problem with MobX 5+ : Your environment doesn't support Symbol and Proxy objects.
Problem: MobX 5+ requires Proxy and Symbol objects. If your environment doesn’t support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore., js engine: hermes

Reproducing the error:
react-native init HermesWithMobX
yarn add mobx --save
yarn add mobx-react-lite
project.ext.react = [
entryFile: "index.js",
enableHermes: true,
]
And I’m just using the MobX also you can look this repo for this example:
Example Repo: https://github.com/talut/mobx-with-hermes-example
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 19
- Comments: 19 (5 by maintainers)
Commits related to this issue
- Don't bump mobx for now; stay at 4.x.x to keep iOS 9 & Hermes compatibility We need to lock mobx at 4.x because of facebook/hermes#28 (as well as the old version of JavaScriptCore in iOS 9 not suppor... — committed to infinitered/ignite-bowser by bryanstearns 5 years ago
- Switch CI to use Clang (#28) Summary: GCC 7.4 (which is what GitHub Actions supports) is having trouble compiling the latest trunk, even though we think it is valid C++14. Pull Request resolved: http... — committed to facebook/hermes by dreiss 5 years ago
A lot of people (including me) are using mobx and mst, so this is really sad Hermes excluded proxy from the support list.
For object dynamic properties observing and for wrapping arrays. MobX@4 arrays could not work properly with some third-party libraries.
This PR will not be accepted. Using Proxy’es was deliberate decision. MobX@4 is official LTS for old js environments. In most cases downgrading to MobX@4 is ok.
But IMO Proxy should be supported in long-term.
See the most recent updates on issue https://github.com/facebook/hermes/issues/33#issuecomment-606963341
Proxy is now enabled in Hermes, but not yet by default. See the instructions in that comment for enabling it and testing it out. Once we’re more certain that there aren’t bugs in the Proxy implementation we’ll expose it by default.
We are investigating Proxy for Hermes, so that will be a solution at some point. I’m not ready to give a date, but progress is looking good. https://github.com/facebook/hermes/issues/33#issuecomment-523624024
Thanks for answer, I think thats a bad news. Fortunately I’m just using MobX for only experimental reasons. For real projects, my main structure built with Redux.
That’s a bummer… Using
Proxymakes me feel so smart! 🤓Downgrading to MobX 4 has been rather painful for me what with the caveats listed here: https://mobx.js.org/best/pitfalls.html