Skip to content

docs: replace deprecated isLoading with isPending in disabled queries guides#11005

Open
DakshSinghDhami wants to merge 1 commit into
TanStack:mainfrom
DakshSinghDhami:main
Open

docs: replace deprecated isLoading with isPending in disabled queries guides#11005
DakshSinghDhami wants to merge 1 commit into
TanStack:mainfrom
DakshSinghDhami:main

Conversation

@DakshSinghDhami

@DakshSinghDhami DakshSinghDhami commented Jun 29, 2026

Copy link
Copy Markdown

Updates the disabling-queries guides across React, Vue, Solid, and Angular frameworks to use isPending instead of the deprecated isLoading flag, which was replaced in TanStack Query v5.

isLoading is still available as an alias but will be removed in the next major version.

Summary by CodeRabbit

  • Documentation
    • Updated query disabling examples across Angular, React, Solid, and Vue to use the newer pending state in loading conditions.
    • Aligned the displayed “Loading...” behavior with the updated state handling in all examples.
    • Clarified the initial disabled-query state in the React guide.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Documentation examples in the disabling-queries guides for Angular, React, Solid, and Vue are updated to replace isLoading with isPending for the loading state conditional rendering in the enabled: false query examples.

Docs: isLoading → isPending

Layer / File(s) Summary
Replace isLoading with isPending across framework guides
docs/framework/react/guides/disabling-queries.md, docs/framework/angular/guides/disabling-queries.md, docs/framework/solid/guides/disabling-queries.md, docs/framework/vue/guides/disabling-queries.md
Destructuring and conditional rendering in each framework's disabling-queries example updated from isLoading to isPending.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • TanStack/query#10990: Updates similar documentation examples replacing isLoading with isPending in other framework guide files.

Poem

🐇 Hop, hop, the status changed today,
isLoading has hopped away!
isPending now leads the queue,
Across Angular, Solid, Vue.
The docs are fresh, the bunnies cheer! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description states the change, but it misses the required template sections for Changes, Checklist, and Release Impact. Add the template sections with a short changes summary, checklist items, and release impact selection.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: switching disabled query guides from isLoading to isPending.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/framework/react/guides/disabling-queries.md (1)

23-41: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Example contradicts the explanatory guidance below.

Lines 23 and 41 change the disabled-query example to use isPending, but the text at lines 86–94 explicitly warns that isPending is unsuitable for disabled queries because it is true immediately when there is no data, even when not fetching. It recommends using isLoading (isPending && isFetching) instead. With enabled: false, the revised example will show "Loading..." on initial render despite no fetch being in-flight, which is confusing.

Either revert the example to isLoading or update the explanatory text to match the new intended behavior.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/framework/react/guides/disabling-queries.md` around lines 23 - 41, The
disabled-query example currently uses isPending in the rendered state, which
conflicts with the guidance that disabled queries should rely on isLoading
(isPending && isFetching) instead. Update the example in the React
disabling-queries guide so the component logic in the useQuery-based snippet
matches the explanatory text, either by switching the conditional back to
isLoading or by revising the nearby explanation to explicitly endorse isPending
for this case; make sure the behavior of the Fetch Todos example is consistent
with enabled: false.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/framework/react/guides/disabling-queries.md`:
- Around line 23-41: The disabled-query example currently uses isPending in the
rendered state, which conflicts with the guidance that disabled queries should
rely on isLoading (isPending && isFetching) instead. Update the example in the
React disabling-queries guide so the component logic in the useQuery-based
snippet matches the explanatory text, either by switching the conditional back
to isLoading or by revising the nearby explanation to explicitly endorse
isPending for this case; make sure the behavior of the Fetch Todos example is
consistent with enabled: false.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 65dac183-19a1-400f-8a6d-b03b8620bfe4

📥 Commits

Reviewing files that changed from the base of the PR and between d6798b5 and 50b7283.

📒 Files selected for processing (4)
  • docs/framework/angular/guides/disabling-queries.md
  • docs/framework/react/guides/disabling-queries.md
  • docs/framework/solid/guides/disabling-queries.md
  • docs/framework/vue/guides/disabling-queries.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant