@react-firebase/firestore
Version:
Efficiently Render & mutate Firestore data in your react(or react-native) app.
26 lines (25 loc) • 930 B
TypeScript
import { FirestoreProviderState } from "./types";
import { DocumentSnapshot, QuerySnapshot, CollectionReference } from "@google-cloud/firestore";
export declare type AddPathToDataArgs = {
path: string;
value: any;
unsub: () => void;
isLoading?: boolean;
snapshot?: DocumentSnapshot | QuerySnapshot | CollectionReference;
};
export declare const actions: {
addPathToData: (state: FirestoreProviderState, { path, value: newData, unsub, isLoading, snapshot }: AddPathToDataArgs) => any;
removePathFromData: (state: FirestoreProviderState, { path }: {
path: string;
}) => FirestoreProviderState & {
dataTree: {
[path: string]: {
isLoading: boolean;
value: import("./types").FirestoreNodeValue[];
unsub: () => void;
};
} & {
[x: string]: undefined;
};
};
};