-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Set Concast["@@species"] = Observable as well as Symbol.species. #7403
Conversation
An attempt to address the problems I speculated about in #6520 (comment) Theory: in the Hermes JS engine, Symbol.species is not defined, so Object.defineProperty was not called, but perhaps "@@species" was getting set somewhere else by a polyfill library, causing the zen-observable library to fall back to "@@species" instead of using/ignoring the nonexistent Symbol.species symbol.
Thank you very much for your effort! I try to test this patch in the near future. |
Using Hermes on android this hasn't fixed the issue for me, unfortunately. |
@hannojg Did you build your own In any case, this change should be in the next v3.4 beta release, so it's easier to install locally. I think there might be more than one problem under discussion in #6520, by the way. If this PR fixes anyone's problems, then we can focus on the other problems after that, without the |
Thank you @benjamn for fixing this. We will help confirm if this fixes our subscriptions on Android with Hermes. |
I've tested this change on our app. Works well when hermes is enabled. Thanks @benjamn 👏 , this is a great fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, amazing catch and fix @benjamn. Thanks!
@benjamn yes I did, happy to test this again when there is a public release (building the Apollo client manually and using this caused other warning which the console throw at me, probably messed something up) |
An attempt to address the problems I speculated about in #6520 (comment) Theory: in the Hermes JS engine, Symbol.species is not defined, so Object.defineProperty was not called, but perhaps "@@species" was getting set somewhere else by a polyfill library, causing the zen-observable library to fall back to "@@species" instead of using/ignoring the nonexistent Symbol.species symbol.
An attempt to address the problems I speculated about in #6520 (comment) Theory: in the Hermes JS engine, Symbol.species is not defined, so Object.defineProperty was not called, but perhaps "@@species" was getting set somewhere else by a polyfill library, causing the zen-observable library to fall back to "@@species" instead of using/ignoring the nonexistent Symbol.species symbol.
This change has been backported to |
For some reason, subcription not working for me =( loading state true, data and error are undefined. Im using apollo client 3.3.8. Im got data on playground however |
👋! can you show me the npm packages regarding the apollo/client and react native package? I have already tried installing @apollo/[email protected] and @apollo/[email protected] there are my current packages
Are there any solutions to this? thanks before. |
This is an initial attempt to address the problems I speculated about in #6520 (comment).
Theory: in the Hermes JS engine (used by React Native on Android),
Symbol.species
is not defined, soObject.defineProperty
was not called by this code, but perhapsConcast["@@species"]
was getting set somewhere else by a polyfill library, causing thezen-observable
library to fall back to"@@species"
ingetSpecies
instead of safely ignoring the nonexistentConcast[Symbol.species]
property.If that theory is correct, subscriptions will become usable with Hermes on React Native again, fixing #6520. 🤞