refs that were created by using an getter are not reactive (userDocument and userFriends )
Additional information
This looks like a bug as the documentation show the usage of a getter.
Either way, I'm willing to dive into the source code to understand/fix the bug, or to update the documentation to make it clear that getters aren't supported.
This should indeed work. I'm happy you want to contribute! The bug should be the usage of isRef() in order to setup the watcher in both firestore and database. Could you add a test too?
Reproduction
https://stackblitz.com/edit/vitejs-vite-wlriny?file=src%2FApp.vue
Steps to reproduce the bug
The reproduction example show ways to use
useDocument
anduseCollection
Expected behavior
Acording to the documentation, you can pass both a getter or a computed(). https://vuefire.vuejs.org/guide/realtime-data.html#Declarative-realtime-data. So
userDocument
anduserFriends
should update when you change userActual behavior
refs that were created by using an getter are not reactive (
userDocument
anduserFriends
)Additional information
This looks like a bug as the documentation show the usage of a getter.
Either way, I'm willing to dive into the source code to understand/fix the bug, or to update the documentation to make it clear that getters aren't supported.