UNPKG

tqf

Version:

React Query hooks for Firebase.

40 lines (28 loc) 896 B
--- title: Getting Started | Cloud Firestore description: Hooks for integrating with Firestore. --- # Getting Started The `@react-query-firebase/firestore` package provides hooks querying, subscribing and modifying collections and documents on Cloud Firestore. ## Installation ```bash npm i --save @react-query-firebase/firestore ``` ## Usage To use the hooks, export a `Firestore` instance from your codebase, e.g: ```js // src/firebase.js import { initializeApp } from 'firebase/app'; import { getFirestore } from 'firebase/firestore'; const firebase = initializeApp({ ... }); export const firestore = getFirestore(firebase); ``` ## Documentation - [Querying Collections](/firestore/querying-collections) - [Querying Documents](/firestore/querying-documents) - [Data Mutation](/firestore/data-mutation) - [Prefetching](/firestore/prefetching) - [TypeScript](/firestore/typescript)