Strip down the Document property from the data itself?
binajmen opened this issue · comments
Benjamin commented
Is there a convenient way provided by this library that I'm not aware of to remove the additional fields (id
, exists
, hasPendingWrites
, __snapshot
) from a document?
I was thinking about:
const { id, exists, hasPendingWrites, __snapshot, ...rest } = data
Fernando Rojo commented
That looks right!
Benjamin commented
Would it make sense to add a data()
function similar to Firestore to automate this, or am I the only one to have this need?