Getting Started

Authentication

Realtime Database

Firestore

useSetWithPriorityMutation

Write data and priority to a location in one operation.

Usage

import { ref } from "firebase/database";
import { useSetWithPriorityMutation } from "@tanstack-query-firebase/react/database";

const taskRef = ref(database, "tasks/task-1");
const { mutate } = useSetWithPriorityMutation(taskRef);
mutate({ value: { title: "Ship docs" }, priority: 1 });