I\'m .push()
ing into a firebase reference.
I want a listener to be able to come online, and then be notified only of newly .push()
ed children
startAt() returns the oldest (first) records, where endAt() returs the last (newest) records, assuming you've used push() to store them.
So this would give you the newest entries:
ref.endAt().limit(1)
Keep in mind that the first record you receive will be previously existing, so it should be discarded in the use case that only data added after a user comes online is of value.