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

autoConnect is broken #150

Closed jankapunkt closed 6 months ago

jankapunkt commented 8 months ago

Describe the bug setting autoConnect to false will still cause an auto connect. This is, because autoConnect is implemented in DDP and Meteor.connect and while in DDP class it will respect the autoConnect flag, it won't in Meteor connect.

To Reproduce

Meteor.connect(url, {
  ...
  autoConnect: false,
  ...
})

const Data = Meteor.getData()
Data.ddp.on('connected', () => {
  console.debug('this should never fire')
})

Expected behavior autoConnect set to false should prevent auto connect.

jankapunkt commented 8 months ago

@bratelefant should I implement the fix in #147 or in an own PR?

bratelefant commented 8 months ago

I guess it's fine if we merge this in as well. Found out that I patched this in my app manually, would like to test the complete bundle in staging as well

github-actions[bot] commented 6 months ago

Closing this issue due to no activity. Feel free to reopen.

jankapunkt commented 6 months ago

keep open