Comments (19)
A lot of people (including me) are using mobx and mst, so this is really sad Hermes excluded proxy from the support list.
from hermes.
Does anyone know what specific features MobX requires Proxy for?
For object dynamic properties observing and for wrapping arrays. MobX@4 arrays could not work properly with some third-party libraries.
we could submit a PR to avoid that check until it's necessary
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.
from hermes.
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.
from hermes.
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)
from hermes.
@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.
from hermes.
That's a bummer... Using Proxy
makes me feel so smart! 🤓
from hermes.
Downgrading to MobX 4 has been rather painful for me what with the caveats listed here: https://mobx.js.org/best/pitfalls.html
from hermes.
@talut you can check this doc.its excluded. https://github.com/facebook/hermes/blob/master/doc/Features.md#excluded-from-support
from hermes.
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.
from hermes.
I'm using mobx too
from hermes.
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
from hermes.
@schumannd V8 supports Proxy but you can't use it with RN
from hermes.
@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.
from hermes.
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.
from hermes.
if you're looking for just Proxy support you can stay at the JSC
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.
from hermes.
What is better: downgrade mobx to 4v or disable hermes? What gives more profit?
from hermes.
What is better: downgrade mobx to 4v or disable hermes? Which gives more profit?
from hermes.
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.
from hermes.
downgrade mobx to 4v or disable hermes
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.
from hermes.
Related Issues (20)
- Bug: recursion: "Maximum call stack size exceeded" HOT 2
- Wrong `DCMAKE_TOOLCHAIN_FILE` in docs HOT 3
- Intl.NumberFormat with compact notation doesn't display formatting HOT 1
- Examples how to use the experimental C ABI? HOT 3
- babel-plugin-syntax-hermes-parser drops chunk names
- static_h: Assertion `Val && "isa<> used on a null pointer"' failed with -typed on tsc.js HOT 2
- fatal: unable to access 'http://github.com/facebook/hermes.git/' HOT 2
- I hope Static Hermes supported Windows, Linux, and MacOS. HOT 2
- Local debug and release build throws a type error HOT 2
- I hope it was possible for Static Hermes to native AOT compile all the existing NPM modules. HOT 1
- Intl.DateTimeFormat does not support 'Europe/Kyiv' timezone HOT 2
- It would be good for Static Hermes if it could use pure JavaScript code(that has no type annotations) with automatic type guessing like "var" code in Dart, or ":=" in Go. HOT 7
- Using Intl with standalone Hermes app HOT 2
- Support for top level await HOT 1
- iphoneos framework very large size issue (build-apple-framework.sh) HOT 2
- [Debugger] Incorrect scope variable information for variable initialized in for-loop HOT 3
- Race Condition between HadesGC and HermesInternal.getEpilogues() Causes Segfault
- Assertion `IDom && "Reached the top of the tree!"' failed in ./hermes/lib/Optimizer/Scalar/Mem2Reg.cpp HOT 1
- prettier plugin: Infinite loop for malformed graphql relay query
- Closures caputure external variable errors HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hermes.