title: TypeError: undefined is not an object, react native
body: <p>I added a new state to my application to know whether the user is logged in or not, and this error shows up during the runtime now!</p>
  
  <p><a href="https://i.imgur.com/7Bd44M9.jpg" rel="nofollow noreferrer"><img src="https://i.imgur.com/7Bd44M9.jpg" alt="the error"></a></p>
  
  <p>Before adding this, everything was great, everything was working fine, I tried looking for this error but everybody mentioned some babel-react which I don't use. As I mentioned clearing cache didn't help. I haven't upgraded react native lately, so it's not because of the update. ESLint doesn't show error at all.
  Main problem is with this 'isloggedin' boolean state wariable, but I don't realize what the issue may be.
  Any kind of advice or help would be amazing.
  Thank's in advance. </p>
  
  <p>I've tried cleaning the cache, restarting everything</p>
  
  <pre><code>import React, { Component } from 'react';
  import { View } from 'react-native';
  import firebase from 'firebase';
  import { Header, Button } from './components/common';
  import Loginform from './components/Loginform';
  
  class App extends Component {
      state = { isloggedin: false };
      componentWillMount() {
          firebase.initializeApp({
              apiKey: 'AIzaSyDN_m1VetpIBLji_S8Hng1zbPlNwaQTBiI',
              authDomain: 'authentication-83b93.firebaseapp.com',
              databaseURL: 'https://authentication-83b93.firebaseio.com',
              projectId: 'authentication-83b93',
              storageBucket: '',
              messagingSenderId: '863329573565',
              appId: '1:863329573565:web:08bedbdc76995c53'
            }
          );
          firebase.auth().onAuthStateChanged((user) =&gt; {
              if (user) {
                  this.setState({ isloggedin: true });
              } else {
                  this.setState({ isloggedin: false });
              }
          });
      }
      renderContent() {
          if (this.user.isloggedin) {
              return (
                  &lt;Button&gt;
                      Log Out
                  &lt;/Button&gt;
              )
          } else
          return &lt;Loginform /&gt;;
      }
       render() {
          return (
          &lt;View&gt;
              &lt;Header headerText="HopeSter Log In" /&gt;
              {this.renderContent()}
          &lt;/View&gt;
          );
      }
  }
  export  default App;
  </code></pre>