Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/framework/react/guides/queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ TypeScript will also narrow the type of `data` correctly if you've checked for `

In addition to the `status` field, you will also get an additional `fetchStatus` property with the following options:

- `fetchStatus === 'fetching'` - The query is currently fetching.
- `fetchStatus === 'fetching the data'` - The query is currently fetching.
- `fetchStatus === 'paused'` - The query wanted to fetch, but it is paused. Read more about this in the [Network Mode](../network-mode.md) guide.
- `fetchStatus === 'idle'` - The query is not doing anything at the moment.

Comment on lines +123 to 126
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Incorrect fetchStatus literal — should be 'fetching'

The valid fetchStatus values are exactly: 'fetching', 'paused', 'idle'. Changing the first bullet to "fetching the data" is incorrect and inconsistent with the rest of this page and the official docs. Please revert to 'fetching'. (tanstack.com)

Apply this diff:

- - `fetchStatus === 'fetching the data'` - The query is currently fetching.
+ - `fetchStatus === 'fetching'` - The query is currently fetching.

Run this to catch any similar regressions across the docs:


🏁 Script executed:

#!/bin/bash
# Find incorrect literals
rg -n -C2 "fetching the data|fetchStatus\s*===\s*['\"]fetching the data['\"]" docs

# Sanity-check all documented fetchStatus values
rg -n -C2 "fetchStatus\s*===\s*['\"](fetching|paused|idle)['\"]" docs

Length of output: 2011


Use the correct fetchStatus literal: replace 'fetching the data' with 'fetching'
The fetchStatus property only supports the exact values 'fetching', 'paused', and 'idle'. Update the first bullet in the Queries guide to match the official API.

  • File: docs/framework/react/guides/queries.md
    Line: 123

Apply this diff:

- `fetchStatus === 'fetching the data'` - The query is currently fetching.
+ `fetchStatus === 'fetching'` - The query is currently fetching.

Verification with ripgrep shows this is the only occurrence of the incorrect literal in docs/. No further changes needed.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- `fetchStatus === 'fetching the data'` - The query is currently fetching.
- `fetchStatus === 'paused'` - The query wanted to fetch, but it is paused. Read more about this in the [Network Mode](../network-mode.md) guide.
- `fetchStatus === 'idle'` - The query is not doing anything at the moment.
- `fetchStatus === 'fetching'` - The query is currently fetching.
- `fetchStatus === 'paused'` - The query wanted to fetch, but it is paused. Read more about this in the [Network Mode](../network-mode.md) guide.
- `fetchStatus === 'idle'` - The query is not doing anything at the moment.
🤖 Prompt for AI Agents
In docs/framework/react/guides/queries.md around lines 123 to 126, the first
bullet uses the incorrect fetchStatus literal `'fetching the data'`; change it
to the exact supported literal `'fetching'` so the list reads `'fetching'`,
`'paused'`, and `'idle'` to match the official API and documentation.

Expand Down