@react-firebase/firestore
Version:
Efficiently Render & mutate Firestore data in your react(or react-native) app.
29 lines (28 loc) • 1.09 kB
TypeScript
import * as React from "react";
import { FirestoreProviderState } from "../types";
export declare type FirestoreBatchedWriteWithContextProps = FirestoreProviderState;
export declare class FirestoreBatchedWriteWithContext extends React.Component<FirestoreBatchedWriteWithContextProps> {
createMutationBatch: () => {
addMutationToBatch: ({ path, value, type }: {
path: string;
value: any;
type: "add" | "update" | "set" | "delete";
}) => void;
commit: () => Promise<void>;
};
shouldComponentUpdate(nextProps: FirestoreBatchedWriteWithContextProps): boolean;
render(): any;
}
export declare type ChildrenArgs = {
addMutationToBatch: ({ path, value, type }: {
path: string;
value: any;
type: "add" | "update" | "set" | "delete";
}) => void;
commit: () => Promise<void>;
};
export declare class FirestoreBatchedWrite extends React.Component<{
children: ({ addMutationToBatch, commit }: ChildrenArgs) => React.ReactNode;
}> {
render(): JSX.Element;
}