-
Notifications
You must be signed in to change notification settings - Fork 646
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
Problem with MobX 5+ : Your environment doesn't support Symbol and Proxy objects. #28
Comments
@talut you can check this doc.its excluded. https://github.com/facebook/hermes/blob/master/doc/Features.md#excluded-from-support |
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. |
A lot of people (including me) are using mobx and mst, so this is really sad Hermes excluded proxy from the support list. |
Does anyone know what specific features MobX requires Proxy for? If it's a small part of the library, we could submit a PR to avoid that check until it's necessary (and then perhaps most users of MobX will be unaffected). If it's systemic to the library (and it is widely used), we'll talk about what it would take to enable Proxy. We have avoided it in the past because it is likely to cause a performance hit to a lot of object property reads/writes. Note that the exception message includes a short-term mitigation, using MobX 4. Not sure if that will work for everybody. For now I'll close this issue, as there's nothing we can do in the short term. Feel free to open another issue called "Implement Proxy" and include various use-cases in popular libraries such as MobX. That can be a long-running issue that we'll track and communicate how we might plan to implement it. |
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. |
I'm using mobx too |
That's a bummer... Using |
Downgrading to MobX 4 has been rather painful for me what with the caveats listed here: https://mobx.js.org/best/pitfalls.html |
…bility 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 supporting Proxies). We could move to 5.x if we are okay with not supporting iOS 9 and Hermes, but we don't think that's a viable path forward at this time.
Does anyone know if V8 supports Proxies? I am about to switch from JSC to either V8 or Hermes, and this might be the deciding factor |
@schumannd V8 supports Proxy but you can't use it with RN |
@terrysahaidak you can't use V8 with RN? or Proxy with RN? Because using V8 with RN60+ has been recommended to fix a recent severe bug I have not tried it yet, so I can't say whether it actually works or not. |
Wow, this is cool, I didn't know about this project. But still, if you're looking for just Proxy support you can stay at the JSC because the main point of Hermes (I think) is increasing TTI, v8 isn't really better on this. |
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. #33 (comment) |
I am trying to fix this bug where the suggested fix is to switch to V8 or Hermes. So JSC is not an option. The bug is also pretty hard to reproduce so I don't want to take any chances. |
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: facebookincubator/fbjni#28 Test Plan: OSS CI passes: https://github.com/facebookincubator/fbjni/commit/cb99a001c4d40e571ae2af5edd1753d9aa2ecba9/checks?check_suite_id=376297298 Reviewed By: swolchok Differential Revision: D19239659 Pulled By: dreiss fbshipit-source-id: 6e4724fa10f1367fdacf5f2f9a520dd6d98b30bf
What is better: downgrade mobx to 4v or disable hermes? What gives more profit? |
See the most recent updates on issue #33 (comment) 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. |
What is better: downgrade mobx to 4v or disable hermes? Which gives more profit? |
I think Hermes has more profit. You can use Redux or directly the context api. Also Hermes will be available in IOS too. Hermes vs JSC benchmarks shows the reason to use. But you should ask for yourself "Do I need Mobx". If it's yes should use MobX and forgot the Hermes :) Such decisions should be made according to the project need. |
Neither. Opt in to using hermes with Proxy support as described in #33 (comment). Then you can keep using MobX 5. Or, wait for RN 0.64, which works with Hermes v0.7, which has Proxy enabled by default. |
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:
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
The text was updated successfully, but these errors were encountered: