Skip to content

React Native - Write Functions

Standalone functions for creating, updating, and deleting documents without fetching them first.

API Reference

FunctionDescription
setDocumentCreate or overwrite a document (supports merge)
setSpecificDocumentCreate or overwrite a specific document
updateDocumentPartially update an existing document
updateSpecificDocumentPartially update an existing specific document
deleteDocumentDelete a document
deleteSpecificDocumentDelete a specific document

The set* functions accept an optional SetOptions parameter for { merge: true } or { mergeFields: [...] } behavior. The *Specific* variants accept a DocumentReference directly instead of a collection ref + id.

See React - Write Functions for notes on client-side mutations.

Released under the Apache-2.0 License.