docs: replace deprecated isLoading with isPending in disabled queries guides#11005
docs: replace deprecated isLoading with isPending in disabled queries guides#11005DakshSinghDhami wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughDocumentation examples in the disabling-queries guides for Angular, React, Solid, and Vue are updated to replace Docs: isLoading → isPending
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 winExample 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 thatisPendingis unsuitable for disabled queries because it is true immediately when there is no data, even when not fetching. It recommends usingisLoading(isPending && isFetching) instead. Withenabled: false, the revised example will show "Loading..." on initial render despite no fetch being in-flight, which is confusing.Either revert the example to
isLoadingor 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
📒 Files selected for processing (4)
docs/framework/angular/guides/disabling-queries.mddocs/framework/react/guides/disabling-queries.mddocs/framework/solid/guides/disabling-queries.mddocs/framework/vue/guides/disabling-queries.md
Updates the
disabling-queriesguides across React, Vue, Solid, and Angular frameworks to useisPendinginstead of the deprecatedisLoadingflag, which was replaced in TanStack Query v5.isLoadingis still available as an alias but will be removed in the next major version.Summary by CodeRabbit