I am using firebase in my react native project in expo CLI. I am trying to get the user information in another file that has been logged in. But for some reason i am facing the error that has been shown in this screenshot.

I tried initialising the firebase object in componentWillMount() as well as in the constructor. Yet it is throwing the same error, However if i come back and restart the app. It works just fine. Dashboard.js
import React, { Component } from 'react'
import { Text, View , StyleSheet } from 'react-native'
import * as firebase from 'firebase';
import firebaseConfig from '../config';
if (!firebase.apps.length) {
firebase.initializeApp(firebaseConfig);
}
export class DashBoard extends Component {
constructor()
{
super();
}
render() {
return (
<View style={styles.container}>
<Text>Hello {firebase.auth().currentUser.email} </Text>
</View>
)
}
}
export default DashBoard;
const styles= StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: 'center'
}
})