@react-firebase/database
Version:
Efficiently Render & mutate Firebase Realtime Database data in your react(or react-native) app.
27 lines (26 loc) • 1.14 kB
TypeScript
import * as React from "react";
import { FirebaseDatabaseProviderState } from "../types";
export { FirebaseDatabaseProvider } from "./FirebaseDatabaseProvider";
export declare type Nullable<T> = T | null;
export declare type FirebaseMutationProps = {
path: string;
type: "set" | "update" | "push";
children: ({ runMutation }: {
runMutation: RunMutation;
}) => React.ReactNode;
};
export declare type FirebaseDatabaseMutationWithContextProps = FirebaseMutationProps & FirebaseDatabaseProviderState;
export declare type RunMutation = (value: any) => Promise<{
path: FirebaseMutationProps["path"];
value: any;
type: FirebaseMutationProps["type"];
key?: Nullable<string>;
}>;
export declare class FirebaseDatabaseMutationWithContext extends React.Component<FirebaseDatabaseMutationWithContextProps> {
createMutationRunner: () => RunMutation;
shouldComponentUpdate(nextProps: FirebaseDatabaseMutationWithContextProps): boolean;
render(): any;
}
export declare class FirebaseDatabaseMutation extends React.Component<FirebaseMutationProps> {
render(): JSX.Element;
}