Skip to content
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

should RemoteMongoCollection.watch work when using MongoDB Stitch React Native SDK? #348

Closed
hayate opened this issue Dec 27, 2019 · 3 comments

Comments

@hayate
Copy link

hayate commented Dec 27, 2019

In the documentation here: https://docs.mongodb.com/stitch-sdks/js-react-native/4/classes/stream.html it says that it is possible to watch to a remote MongoDB for changes using a call to RemoteMongoCollection.watch

I was trying the functionality but the watch method is undefined, in fact, I don't see it here https://docs.mongodb.com/stitch-sdks/js-react-native/4/interfaces/remotemongocollection.html or here https://github.com/mongodb/stitch-js-sdk/blob/master/packages/react-native/services/mongodb-remote/src/RemoteMongoCollection.ts

Is the watch method not available for Stitch React Native SDK?
Is there a way to watch for changes from a remote MongoDB Atlas using Stitch in react-native?

@tDuy
Copy link

tDuy commented Dec 27, 2019

React Native SDK is way behind... It doesn't has custom user data too.

react-native-community/discussions-and-proposals#99 (comment)
It seems to me that we have to wait for React Native 0.62

@adamchel
Copy link
Contributor

adamchel commented Jan 3, 2020

@tDuy is correct. We will not be able to support watching change streams in the React Native SDK until React Native 0.62 is released. Sometime after that happens, I will create a React Native EventSource library using the newly exposed network primitives in 0.62, and we will update the Stitch React Native SDK to support watching change streams.

@adamchel
Copy link
Contributor

Hey everyone, we've just released experimental watch support for React Native! See https://github.com/mongodb/stitch-js-sdk/releases/tag/v4.9.0 for details on how you can use it. We can release this non-experimentally once React Native 0.62 is officially released.

If you have any problems with it, feel free to open a new issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants