IjzerenHein / firestorter

Use Google Firestore in React with zero effort, using MobX 🤘
http://firestorter.com
MIT License
378 stars 50 forks source link

Add `hasData` observable property for Document #41

Closed Strate closed 5 years ago

Strate commented 5 years ago

Hey! It would be useful to have hasData: boolean property on Document. It behaves as:

  1. When Document have no data, it resolves to false

  2. When Document have any data available, it resolves to true.

It is not same as existing isLoading, because it is not become false when new ref set, for example.

IjzerenHein commented 5 years ago

Hey Artur, yes this is a really good idea. I will add it in the next release which I'm working on right now. Cheers

IjzerenHein commented 5 years ago

I've added hasData, it's in the just released v1.1.0 release. cheers