Realtime Database

The @react-query-firebase/database package provides hooks fetching and mutating data on Realtime Database.

Installation

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

Usage

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

import { initializeApp } from 'firebase/app';
import { getDatabase } from 'firebase/database';

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

export const database = getDatabase(firebase);

Documentation