Cloud Functions

The @react-query-firebase/functions package provides hooks for calling Callable Cloud Functions.

Installation

npm i --save @react-query-firebase/functions

Usage

The package provides hooks for calling data as a query (useFunctionsQuery) or as a mutation (useFunctionsMutation).

To use the hooks, export your Functions instance, e.g:

import { initializeApp } from 'firebase/app';
import { getFunctions } from 'firebase/functions';

const firebase = initializeApp({
  ...
});

export const functions = getFunctions(firebase);