track value callback completion in firebaseLoads#73
track value callback completion in firebaseLoads#73joenoon wants to merge 1 commit intoFirebaseExtended:masterfrom
Conversation
use case: no data exists vs data not yet loaded. scenario: this.bindAsArray(ref, "items"); without firebaseLoads there is no way to tell why there are no items, which is a problem if we want to show a "no items" message. if we rely on items.length == 0 we will see the "no items" message flicker before the data is loaded.
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
|
CLA signed |
|
Apologies for the extreme delay in getting back to you on this one. This PR brings up a really great point / use case which I overlooked. There is an existing workaround in which you can attach your own That being said, I'm not sure this is the correct fix for that. It works, but I'm not a huge fan of the API, specifically the extra If you are willing to update your PR, that would be awesome. Otherwise, I opened #74 to track this and will hopefully get to it next time I have a ReactFire coding session. |
use case: no data exists vs data not yet loaded.
scenario: this.bindAsArray(ref, "items"); without firebaseLoads
there is no way to tell why there are no items, which is a problem
if we want to show a "no items" message. if we rely on
items.length == 0 we will see the "no items" message flicker
before the data is loaded.