FirebaseExtended / polymerfire

Polymer Web Components for Firebase
https://www.webcomponents.org/element/firebase/polymerfire
MIT License
459 stars 142 forks source link

Firestore: mixin does not work well with persisted data for documents. #282

Closed merlinnot closed 5 years ago

merlinnot commented 7 years ago

When persistence is enabled for Firestore (by calling enablePersistence method) all documents and queries are cached locally. When using Firestore(Element|Mixin) with live: false I'd expect it to set the property value to locally cached data while the fresh copy is being downloaded. This behavior should be configurable when someone does not want to rely on locally cached data despite enabling persistence.

It can be achieved by using onSnapshot instead of get method (see https://github.com/firebase/polymerfire/pull/278/commits/2f5d602118a7be62b87b86643aefb1b85baa28fc#diff-cd706bcc157b02ba8cbc5d4fb834a3eeR198)