2017-10-02 2 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

굉장하고 감사합니다. Pat :) –

관련 문제