Skip to content
项目

invertase/tanstack-query-firebase

在 GitHub 查看

关于

用于管理 Firebase 异步操作的 TanStack Query hooks。

网站与应用开发

这些数字如何统计

可以做什么

  • 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.

实测星标增长

24小时
0
7天
0
15天
0
1个月
-1

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

TanStack 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


Built and maintained by Invertase.

探索相关项目

加载中…