How to only get new data without existing data from a Firebase?

后端 未结 4 944
无人及你
无人及你 2020-11-27 23:16

I have a node in Firebase getting continually updated with information from a logfile. The node is lines/ and each child of lines/ is from a

4条回答
  •  春和景丽
    2020-11-27 23:34

    You have the right idea. child_added should be called only for the new nodes. Without source code it's hard to tell why you get all the data in your child_added event.

    You can check the chat demo app to see how they load new chat messages. The use case sounds similar.

    https://github.com/firebase/firechat/blob/master/src/js/firechat.js#L347

提交回复
热议问题