Open
Description
Hi all,
I'm setting up react-native-meteor with react-navigation and applying the container as follows:
return {
connected: Meteor.status().connected,
user: Meteor.user(),
};
Then setting the login status to the state with:
componentDidMount() {
if (this.props.connected && this.props.user) {
this.setState({ loggedIn: true });
} else if (this.props.connected && !this.props.user) {
this.setState({ loggedIn: false });
}
}
and then rendering here:
render() {
return this.state.loggedIn ? <StackNavigator /> : <SignedOut />;
}
It seems to work, but I notice that the DDP connection gets disconnected very so often and completely resets the StackNavigator. Any suggestions on how to avoid this? Appreciate the help!