2017-10-02 7 views

答えて

3

あなたは正しい軌道に乗っているが、.then()は、コールバックで使用されている検索一部欠落している:

var recentPostsRef = firebase.database().ref('/store'); 
recentPostsRef.once('value').then(snapshot => { 
    // snapshot.val() is the dictionary with all your keys/values from the '/store' path 
    this.setState({ stores: snapshot.val() }) 
}) 

firebase.database.Referenceのドキュメントには、多くの良い例と説明があります。

+1

恐ろしく、ありがとうございます。 –

関連する問題