Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up
Firebase 的api资料有推荐的吗?这个demo里面有关firebae部分的代码没看懂,如:api.child().on(),api.child().once(),找了很久没找到firebase的api资料。
不知道这里面的items 数据怎么从firebase上下载下来的。
api.child('topstories').on('value', snapshot => {
topStoryIds = snapshot.val()
debugger;
store.emit('topstories-updated')
})
api.child('item/' + id).once('value', snapshot => {
const story = itemsCache[id] = snapshot.val()
resolve(story)
}, reject)