---
title: usePushMutation
---
> ## Documentation Index
> Fetch the complete documentation index at: https://react-query-firebase.invertase.dev/llms.txt
> Use this file to discover all available pages before exploring further.

Append a child with an auto-generated key to a list.

## Usage

```tsx
import { ref } from "firebase/database";
import { usePushMutation } from "@tanstack-query-firebase/react/database";

const messagesRef = ref(database, "messages");
const { mutate, data: newRef } = usePushMutation(messagesRef);
mutate({ text: "Hello" });
```
