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

On resume User is temporarily null after loggingIn is set to false #58

Closed ToyboxZach closed 1 year ago

ToyboxZach commented 3 years ago

When reconnecting to the server the order of events is

Meteor.status().connected == true Meteor.loggingIn() == true Meteor.loggingIn() == false Meteor.user() gets set

When I would expect

Meteor.status().connected == true Meteor.loggingIn() == true Meteor.user() gets set Meteor.loggingIn() == false

This inconsistency makes it hard to get the loading states to look right since there is a time that the user is not there but it is not loggingIn and connected.

To work around I need to check if Meteor._userIdSaved is set to see if it's going to load it still, but it is not ideal looking at a private variable.

TheRealNate commented 3 years ago

Hey @ToyboxZach. Thanks for submitting this bug. I've looked at the login flow and confirmed that the issue exists. I will try and get a fix out soon.

github-actions[bot] commented 1 year ago

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