-
Notifications
You must be signed in to change notification settings - Fork 586
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
Investigate the possibility of having Realm Web work in React Native #4178
Comments
I got similar error import { ApolloClient, HttpLink, InMemoryCache } from "@apollo/client"; I am using above 2 realm features to call realm Graphql API in react native |
were anyone able to solve this? having same issue with https://github.com/nats-io/nats.ws |
To solve the problem, install the "text-encoding-polyfill" and add the import statement "import 'text-encoding-polyfill'" to your index.js file as early as possible in your app. At least this worked for me, I hope it helps. |
@mfrfinbox, the solution works for me, thanks |
As per #4174, trying to use Realm Web inside a React Native app throws an error:
Can't find variable: TextDecoder
. Adding https://www.npmjs.com/package/react-native-polyfill-globals gets further, but we then hit an error {{ WARN Invalid responseType: blob}}.If it is possible to make Realm Web work inside React Native, this could be beneficial for users who would like to create a React Native app using Realm which also targets web (see #4177), if offline/sync support is not important (they would need to use Realm Web instead of RealmJS).
The text was updated successfully, but these errors were encountered: