Skip to content

docs(svelte): replace deprecated isLoading with isPending in overview#11003

Open
poetryofcode wants to merge 1 commit into
TanStack:mainfrom
poetryofcode:docs/svelte-fix-isloading-to-ispending
Open

docs(svelte): replace deprecated isLoading with isPending in overview#11003
poetryofcode wants to merge 1 commit into
TanStack:mainfrom
poetryofcode:docs/svelte-fix-isloading-to-ispending

Conversation

@poetryofcode

@poetryofcode poetryofcode commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

The Svelte overview example used query.isLoading which is a deprecated alias in TanStack Query v5. The correct property is query.isPending.

  • All other framework overviews (React, Vue, Solid, Angular) already use isPending
  • isLoading was deprecated in v5 and is now just an alias for isPending && isFetching

Changes

  • docs/framework/svelte/overview.md: Changed {#if query.isLoading}{#if query.isPending}

Test plan

  • Verify isPending matches the API reference docs
  • Check other framework overview files use the same pattern

Summary by CodeRabbit

  • Documentation
    • Updated the Svelte example to use the current loading-state check in the conditional rendering example.

`isLoading` is a deprecated alias for `isPending && isFetching` and is
scheduled for removal in the next major version. The overview example
shows a standard (always-enabled) query, so `isPending` is the correct
flag. All other framework overview docs (React, Vue, Angular, Lit,
Preact) already use `isPending`.

Note: `isLoading` is intentionally retained in disabling-queries guides
where it is the right flag for disabled/lazy queries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f6e687a0-5732-4c4a-adf8-33dc58e1c8be

📥 Commits

Reviewing files that changed from the base of the PR and between d6798b5 and 29b14b8.

📒 Files selected for processing (1)
  • docs/framework/svelte/overview.md

📝 Walkthrough

Walkthrough

A single-line change in the Svelte overview documentation updates the example's conditional rendering check from query.isLoading to query.isPending.

Changes

Svelte Docs Fix

Layer / File(s) Summary
Fix loading state check in example
docs/framework/svelte/overview.md
Replaces query.isLoading with query.isPending in the conditional rendering example.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~1 minute

Possibly related PRs

  • TanStack/query#10990: Makes the identical isLoadingisPending change in the same Svelte overview doc file.
  • TanStack/query#10991: Also updates docs/framework/svelte/overview.md with the same isLoadingisPending fix.

Poem

A rabbit hopped through docs one day,
Found isLoading in the way.
With a twitch of a paw and a knowing glance,
Swapped isPending — now it has a chance! 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change, but it does not follow the required template sections and omits the checklist and release impact entries. Add the required template headings: Changes, Checklist, and Release Impact, and explicitly mark the docs-only release impact.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise, specific, and accurately describes the Svelte docs change.
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.

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