The firestoreSet
function is a higher-order function that takes a collection path and an options object, and returns a function that can be used to set a documents at a specific address.
firestoreSet
function to set a document at a specified path. The first argument is the slash-separated path of the collection containing the document.
data
property of the arguments object which contains the data that will be written to the document:
DocumentReference
to the newly created document.
firestoreSet
is an optional object allowing for additional configuration. This object can have a property addMetadata
which, if true, adds metadata to the document.