-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added 'firebase-loaded' event to notify clients when initial data has… #124
base: master
Are you sure you want to change the base?
Conversation
… been loaded and can be accessed.
Why can't clients use |
@ebidel They could.... but in situations where the client needs to do something only once (i.e on initial connect to firebase), without the firebase-loaded event, the client will have to do something like this
This results in clients having to "manually" set/clear flags which is error prone and also having to duplicate these checks across the app (where it's needed). Having the firebase-loaded event would help in writing 'cleaner' client code. |
I agree it's a lot nicer to have the event and save some code writing. I'm just thinking about the cost of the listener (even a |
Hmmm... we could have something like this
or we could move the
but it somehow feels |
…t make an additional query to firebase.
@ebidel I've pushed an alternate proposal. Does that eliminate the concern you have? |
… been loaded and can be accessed.
Hi,
There are instances when a client needs to know when it is able to start accessing data from firebase. Having an event to signal that really helps.
Following the docs from firebase, this PR creates an event to signal the client when data from Firebase has been loaded and can be accessed.