Open license2e opened 7 years ago
Could it possibly be related to this: https://github.com/inProgress-team/react-native-meteor/blob/master/src/Meteor.js#L277-L282 ?
Thanks for posting this issue, @license2e
We are having this issue as well, FYI, @adamgins @JulianKingman,
which will lead to a splash on the screen within the subscription established.
@license2e Wondering if you have any workaround for the Meteor.subscribe
method that can restrict it to have the behaviours like Meteor.ddp.sub
?
Thanks
@license2e wondering if worked out solution to this?
@license2e In our case, this only happens when we close the app and then reopen it.
As when we close the app, from my understanding, all the established connections will be lost in client side and we didn't cache Data.subscriptions
, so each time when we open it, Data.subscriptions
is just a plain object and this checking(https://github.com/inProgress-team/react-native-meteor/blob/master/src/Meteor.js#L206-L209) will completely get passed. So we always end up with creating a new subscription which may cause those unexpected behaviours(collections will be cleared up and re-initialised).
We are using @JulianKingman 's great react-native-meteor-offline library, so may try to add functionalities there to handle this case. @adamgins
Description: When subscribing directly using DDP (whether bundled with
react-native-meteor
usingMeteor.ddp.sub
or standalone libraries) the code works as expected:However, when subscribing through
Meteor.subscribe
the following occurs:Code
File:
index.ios.js
Why is this happening?
Console log output when it works: (using
Meteor.ddp.sub
)Console log output when it doesnt work as expected: (using
Meteor.subscribe
)