meteorrn / meteor-react-native

Meteor client for React Native matching Meteor Spec
https://guide.meteor.com/react-native.html
Other
59 stars 31 forks source link

_sub.readyDeps.changed is not a function #86

Closed arianjahiri closed 2 years ago

arianjahiri commented 2 years ago

Describe the bug We've been using react-native-meteor (https://github.com/inProgress-team/react-native-meteor) until now and wanted to get the Tracker hook so have decided to move to this package, as I understand a lot of the package is similar to the previous one but with many improvements. After switching packages I am getting these errors and cannot seem to understand why the Dependency class, when instantiated for each subscription, does not have the defined methods.

ERROR TypeError: _sub.readyDeps.changed is not a function. (In '_sub.readyDeps.changed()', '_sub.readyDeps.changed' is undefined) and ERROR TypeError: record.readyDeps.depend is not a function. (In 'record.readyDeps.depend()', 'record.readyDeps.depend' is undefined)

Seems to produce the changed() error for every one of the subscriptions on our apps home page. Any help is appreciated, not sure if this is some sort of bug or something is wrong with my setup of the app.

To Reproduce Steps to reproduce the behavior:

  1. Open application
  2. Login to the app
  3. Observe crash as Meteor subscriptions are fired

Expected behavior Expect to use subscriptions as usual similar to the package that this replaces.

Device (please complete the following information):

Additional context Our Meteor subscriptions are fired off from redux actions, not sure if it makes a difference as we still use the same Meteor.subscribe().

TheRealNate commented 2 years ago

Hi @arianjahiri,

If I'm understanding correctly you are directly trying to interact with Tracker? Could you please share your full code?

Thanks!

arianjahiri commented 2 years ago

Hi @TheRealNate, thanks for the reply, this was a problem on our end. The way we were using the Tracker directly was not supported by this version.