title: update state with AsyncStorage - React Native
body: <p>I have a small problem with componentWillMount when I want to update the component's state I get this error.</p>
  
  <p><a href="https://i.stack.imgur.com/aOjHd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aOjHd.png" alt="enter image description here"></a></p>
  
  <p>the code is this :</p>
  
  <pre><code>export default class RouterComponent extends Component {
  
  constructor(props) {
      super(props);
      this.state = {
          isLogin: null
      }
  }
  
  componentWillMount = async () =&gt; {
      AsyncStorage.getItem('@MyUserFireBase:key').then(response =&gt; {
          this.setState({ 'isLogin': true });
      }).done();
  }
  
  
  
  render() {
  
      return (
          &lt;Router&gt;
              &lt;Stack key="root" hideNavBar&gt;
                  &lt;Stack key="main"&gt;
                      &lt;Scene key="login" initial={!this.state.isLogin} component={LoginForm} title="Login" /&gt;
                      &lt;Scene key="employeeList" initial={this.state.isLogin} component={EmployeeList} title="Employee List" /&gt;
                  &lt;/Stack&gt;
              &lt;/Stack&gt;
          &lt;/Router &gt;
      )
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I have more than 3 days looking for the solution and I can not find it. What am I doing wrong?
  Thanks for your time</p>