---
title: useGetQuery
---
> ## 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.

Read data once from a Realtime Database location.

## Usage

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

const userRef = ref(database, `users/${uid}`);
const { data: snapshot, isLoading } = useGetQuery(userRef, {
  queryKey: ["database", "users", uid],
});
const value = snapshot?.val();
```
