You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be helpful to add a note for vuexfire that when you bind to a collection, items in that collection can access an id property. It wasn't obvious to me since aside from this, each object is just the document's data, and the id attribute doesn't show up when you print the object or inspect it with dev tools.
The text was updated successfully, but these errors were encountered:
Yep, I need to write documentation in general, it's not just about the id 😓. I lack time and financial support from people to prioritise this. As a result I end up doing it during my free time the best I can... I still fix bugs quickly though
The thing about vuefire/vuexfire, is that it expects you to still know Firebase and use its SDK. When creating documents, you have access to an id property, that's why it is also there in documents. The reason it doesn't appear in console it's because it's made non enumerable to allow people easily create copies of their documents and modify them when doing updates:
// item is a bound documentconstcopy={...item}copy.value='new value'collection.doc(item.id).update(copy)
This is similar to posva/vuexfire#28, I want to add more docs and id will be included. I will add it to #145
It would be helpful to add a note for
vuexfire
that when you bind to a collection, items in that collection can access anid
property. It wasn't obvious to me since aside from this, each object is just the document's data, and theid
attribute doesn't show up when you print the object or inspect it with dev tools.The text was updated successfully, but these errors were encountered: