I need to set up an event listener for firebase that listens for the event whenever a new child is added to a node. But looking at firebase's docs, I have yet to find a good solution.
I thought of using the child_added
event. But according to the document, "child_added is triggered once for each existing child and then again every time a new child is added to the specified path."
But I don't want the event to be triggered for existing children when the listener starts to run.
child_changed
doesn't seem to be a viable option, either. Because the doc says "The child_changed event is triggered any time a child node is modified." So I suppose this won't be triggered when adding a new child.
Any suggestions on how I can set up a listener to be triggered ONLY when a new child is added?