invertase/tanstack-query-firebase
invertase/tanstack-query-firebase has 460 GitHub stars and 68 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-09 05:23 UTC. Last push 2026-05-27.
TanStack Query hooks for managing asynchronous operations with Firebase.
What you can do
- Automatic Caching: Avoid redundant Firebase calls with built-in caching.
- Out-of-the-box Synchronization: TanStack Query keeps your UI in sync with the Firebase backend effortlessly.
- Background Updates: Fetch and sync data seamlessly in the background without interrupting the user experience.
- Error Handling & Retries: Get automatic retries on failed Firebase calls, with robust error handling baked in.
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalTanStack Query Firebase
A set of TanStack Query hooks integrating with Firebase.
Installation • Documentation • License
TanStack Query Firebase provides a set of hooks for handling asynchronous tasks with Firebase in your applications.
Looking for React Query Firebase? Check out the old branch.
Why use this library?
When managing Firebase’s asynchronous API calls within your application, state synchronization can become cumbersome in most applications. You will commonly find yourself handling loading states, error states, and data synchronization manually.
This library provides a hands-off approach to these problems, by leveraging the popular TanStack Query project. Out of the box, you get:
- Automatic Caching: Avoid redundant Firebase calls with built-in caching.
- Out-of-the-box Synchronization: TanStack Query keeps your UI in sync with the Firebase backend effortlessly.
- Background Updates: Fetch and sync data seamlessly in the background without interrupting the user experience.
- Error Handling & Retries: Get automatic retries on failed Firebase calls, with robust error handling baked in.
- Dev Tools for Debugging: Leverage the React Query Devtools to gain insights into your data-fetching logic and Firebase interactions.
By combining Firebase with TanStack Query, you can make your app more resilient, performant, and scalable, all while writing less code.
Installation
This project expects you have firebase installed as a peer dependency. If you haven't done so already, install firebase:
npm i --save firebase
Next, install specific packages for your framework of choice:
React
npm i --save @tanstack/react-query @tanstack-query-firebase/react
See the Documentation for more information on how to use the library.
Status
The status of the following Firebase services and frameworks are as follows:
- ✅ Ready for use
- 🟠 Work in progress
- () Not yet started
| Module | React | Vue | Solid | Angular | Svelte |
|---|---|---|---|---|---|
| analytics | |||||
| app-check | |||||
| auth | 🟠 | ||||
| database | |||||
| data-connect | ✅ | ✅ | |||
| firestore | 🟠 | ||||
| firestore/lite | |||||
| functions | |||||
| installations | |||||
| messaging | |||||
| performance | |||||
| remote-config | |||||
| ai |
License
- See LICENSE
Built and maintained by Invertase.
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,826 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,450 starsreact/react
The library for web and native user interfaces.
252,454 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,624 stars