react-query-firebase / firestore / useSetDocMutation
Function: useSetDocMutation()
function useSetDocMutation<AppModelType, DbModelType, TContext>(param0): UseMutationResult<void, FirebaseError, UseSetDocMutationValues<AppModelType>, TContext>
Defined in: src/firestore/useSetDocMutation.ts:32
Custom hook to create a mutation for setting a document in a Firestore-like database. The mutation can be configured with options and reference to specific document path.
Type Parameters
• AppModelType = unknown
• DbModelType extends DocumentData
= DocumentData
• TContext = unknown
Parameters
param0
UseSetDocMutationOptions
<AppModelType
, DbModelType
, TContext
>
The options for configuring the mutation, including the document reference and additional mutation options.
Returns
UseMutationResult
<void
, FirebaseError
, UseSetDocMutationValues
<AppModelType
>, TContext
>
The result of the mutation operation, which includes states like isLoading, isSuccess, isError, and methods to control the mutation process.