title: Firebase query with Async storage
body: <p>I'm trying to use a value from asyncStorage in my firebase query.</p>
  
  <p>I'm feeling stuck on this. I tried with async/await, try/catch, then.</p>
  
  <p>Not sure how I should do this.</p>
  
  <pre><code>constructor(props) {
      super(props);
      this.state = {
        dataSource: new ListView.DataSource({
          rowHasChanged: (row1, row2) =&gt; row1 !== row2,
        }),
      };
  
      const user = firebase.auth().currentUser;
      if (user != null) {
        AsyncStorage.getItem('parentUid')
          .then((data) =&gt; {
            this.setState({ pUID: data });
          });
        this.itemsRef = this.getRef().child(`Stores/${this.state.pUID}/`);
      } else {
        Alert.alert('Error', 'login again!');
      }
      this.connectedRef = firebase.database().ref('.info/connected');
    }
  </code></pre>