inProgress-team / inProgress-team/react-native-meteor
reactivity on meteor login
- Dominant language
- JavaScript
- Stars
- 688
- Forks
- 200
- PR merge metrics
- No merged PRs in 30d
Description
I am sometimes (~25% of the times) noticing that once my react-native app logs into meteor, it doesn't pick up on the fact that the login is successful and go to the next scene. I think it is a react-native-meteor issue, but I am not sure. One indication is that when I quit the app, and restart it, it auto-logs into meteor and sends me to the next scene as designed.
Is this the fact that reactivity on the Meteor login is failing?
Is there a way to debug this? Here is my code snippet:
```
class MainComponent extends Component {
componentWillMount() {
// Connect to Meteor backend!
Meteor.connect(settings.METEOR_URL);
// Configure Google SignIn
GoogleSignin.hasPlayServices({
autoResolve: true
}).then(() => {
// play services are available. can now configure library
GoogleSignin.configure({
iosClientId: settings.google.iosClientId,
webClientId: settings.google.webClientId,
offlineAccess: false
});
})
.catch((err) => {
console.log("Play services error", err.code, err.message);
});
// Set up our scenes
this.scenes = Actions.create(
);
}
composer() {
return {
connected: Meteor.status().connected,
user: Meteor.user()
};
}
/*eslint-disable no-unused-vars*/
selector(data, props) {
if (!data.connected) {
return "connecting";
} else if (!data.user) {
return "loggedOut";
} else {
return "loggedIn";
}
}
/*eslint-enable no-unused-vars*/
render() {
return (
);
}
}
export default MainComponent;
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.