Skip to content

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

Closed
poetryofcode wants to merge 2 commits into
TanStack:mainfrom
poetryofcode:docs/svelte-fix-isloading-to-ispending
Closed

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

Conversation

@poetryofcode

@poetryofcodepoetryofcode 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

coderabbitaiBot 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 nameStatusExplanationResolution
Description check⚠️ WarningThe 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 nameStatusExplanation
Title check✅ PassedThe title is concise, specific, and accurately describes the Svelte docs change.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck 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.

@nx-cloud

nx-cloudBot commented Jul 6, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit f921df6

CommandStatusDurationResult
nx run-many --target=build --exclude=examples/*...✅ Succeeded<1sView ↗
nx affected --targets=test:sherif,test:knip,tes...✅ Succeeded<1sView ↗

☁️ Nx Cloud last updated this comment at 2026-07-06 11:17:50 UTC

@pkg-pr-new

pkg-pr-newBot commented Jul 6, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@11003

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@11003

@tanstack/lit-query

npm i https://pkg.pr.new/@tanstack/lit-query@11003

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@11003

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@11003

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@11003

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@11003

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@11003

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@11003

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@11003

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@11003

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@11003

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@11003

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@11003

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@11003

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@11003

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@11003

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@11003

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@11003

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@11003

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@11003

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@11003

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@11003

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@11003

commit: f921df6

@sukvvon

Copy link
Copy Markdown
Member

This change was already applied in #10990, so this PR is now redundant and I'll close it.

One clarification for the record: isLoading isn't deprecated. It's a derived flag (isPending && isFetching), so it's perfectly valid to keep using it. The one that's deprecated is isInitialLoading, which is an alias of isLoading. In this particular example isPending is still the better fit, since the snippet only needs to reflect the initial pending state.

@sukvvonsukvvon closed this Jul 6, 2026
Sign up for freeto 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.

2 participants

@poetryofcode@sukvvon