Options for useFirestoreDocWithAtom
| 22 | |
| 23 | /** Options for {@link useFirestoreDocWithAtom} */ |
| 24 | interface IUseFirestoreDocWithAtomOptions<T> { |
| 25 | /** Additional path segments appended to the path. If any are undefined, the listener isn’t created at all. */ |
| 26 | pathSegments?: Array<string | undefined>; |
| 27 | /** Called when an error occurs. Make sure to wrap in useCallback! If not provided, errors trigger the nearest ErrorBoundary. */ |
| 28 | onError?: (error: FirestoreError) => void; |
| 29 | /** Optionally disable Suspense */ |
| 30 | disableSuspense?: boolean; |
| 31 | /** Optionally create the document if it doesn’t exist with the following data */ |
| 32 | createIfNonExistent?: T; |
| 33 | /** Set this atom’s value to a function that updates the document. Uses same scope as `dataScope`. */ |
| 34 | updateDataAtom?: PrimitiveAtom<UpdateDocFunction<T> | undefined>; |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Attaches a listener for a Firestore document and unsubscribes on unmount. |
nothing calls this directly
no outgoing calls
no test coverage detected