The firestoreUpdate
function is a higher-order function that returns a function that updates a document in a collection.
firestoreUpdate
function to update a document from a collection. The first argument is the slash-separated path of the collection.
data
property of the arguments object which contains the data that will be written to the document:
DocumentReference
to the newly created document.
Partial
of the provided type to be passed as the second argument. It will not allow any other type to be passed as the second argument.
firestoreUpdate
is an optional object allowing for additional configuration. This object can have a property addMetadata
which, if true, adds metadata to the document.