Differences between 'child_added' and 'value' firebase?

前端 未结 1 1336
挽巷
挽巷 2020-12-31 22:24

I am seeing a tad difference between child_added and value when returning data in firebase. Using value I can test to see if sna

相关标签:
1条回答
  • 2020-12-31 23:24

    The child_added event fires for each matching child under the node that you query. If there are no matching children, it will not fire.

    This means that to test whether a node exists, you must use a value handler. And since a query can have multiple results, you will need to loop over the children.

    0 讨论(0)
提交回复
热议问题