Skip to content

docs(preact-query): remove hover-prefetch example from 'useQuery'/'useInfiniteQuery' - #11341

Merged
sukvvon merged 1 commit into
mainfrom
docs/preact-query-usequery-useinfinitequery-hover-prefetch-example
Aug 31, 2026
Merged

docs(preact-query): remove hover-prefetch example from 'useQuery'/'useInfiniteQuery'#11341
sukvvon merged 1 commit into
mainfrom
docs/preact-query-usequery-useinfinitequery-hover-prefetch-example

Conversation

@sukvvon

@sukvvon sukvvon commented Aug 31, 2026

Copy link
Copy Markdown
Member

🎯 Changes

useQuery and useInfiniteQuery each had a hover-prefetch @example (Warming the cache on hover, so <Post>/<Comments> has data as soon as it's clicked) where the hook itself was used in one line, while the rest of the example (PostLink, useQueryClient, queryClient.query/queryClient.infiniteQuery) demonstrated a different, imperative API rather than the hook the example is documenting.

The cache-sharing fact these examples existed to convey is already stated by the @see {@link queryOptions} / @see {@link infiniteQueryOptions} lines already present on every overload of both hooks.

  • useQuery.ts: removed the hover-prefetch example (the overload it was on keeps its other example)
  • useInfiniteQuery.ts: same (the overload it was on keeps its other 3 examples)
  • Regenerated the corresponding docs/framework/preact/reference/functions/*.md files with pnpm run generate-docs

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
  • I fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Documentation
    • Updated source references for the Preact useQuery and useInfiniteQuery API documentation.
    • Removed outdated cache-warming and hover-prefetching examples from both hook references.
    • Retained the relevant usage guidance, including the existing skipToken example.
    • No runtime behavior or public API changes are included.

@nx-cloud

nx-cloud Bot commented Aug 31, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 0e8ab8f

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 4m 52s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 7s View ↗

☁️ Nx Cloud last updated this comment at 2026-08-31 00:37:13 UTC

@coderabbitai

coderabbitai Bot commented Aug 31, 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e4212506-2945-42c5-950c-1cacf077d2c4

📥 Commits

Reviewing files that changed from the base of the PR and between fdae2ce and 0e8ab8f.

📒 Files selected for processing (4)
  • docs/framework/preact/reference/functions/useInfiniteQuery.md
  • docs/framework/preact/reference/functions/useQuery.md
  • packages/preact-query/src/useInfiniteQuery.ts
  • packages/preact-query/src/useQuery.ts
💤 Files with no reviewable changes (2)
  • packages/preact-query/src/useQuery.ts
  • packages/preact-query/src/useInfiniteQuery.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The Preact useQuery and useInfiniteQuery documentation removes hover cache-warming examples. The reference pages update source links for the third call signatures. Runtime code and public signatures remain unchanged.

Changes

Preact query documentation

Layer / File(s) Summary
Remove cache-warming examples
packages/preact-query/src/useQuery.ts, packages/preact-query/src/useInfiniteQuery.ts
The source documentation no longer includes hover cache-warming examples.
Update reference source links
docs/framework/preact/reference/functions/useQuery.md, docs/framework/preact/reference/functions/useInfiniteQuery.md
The third call signatures now link to updated source line locations.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 0e8ab

This change removes misleading hover-prefetch examples from the Preact Query documentation without changing published runtime behavior. No actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description explains the documentation changes, the motivation, the regenerated files, test status, checklist completion, and release impact. It matches the required template.
Title check ✅ Passed The title clearly and concisely identifies the removal of the hover-prefetch examples from both Preact Query hooks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/preact-query-usequery-useinfinitequery-hover-prefetch-example

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.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

1 package(s) bumped directly, 24 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/query-core 5.102.8 → 5.102.9 Changeset
@tanstack/angular-query-experimental 5.102.8 → 5.102.9 Dependent
@tanstack/angular-query-persist-client 5.102.8 → 5.102.9 Dependent
@tanstack/eslint-plugin-query 5.102.8 → 5.102.9 Dependent
@tanstack/lit-query 0.2.20 → 0.2.21 Dependent
@tanstack/preact-query 5.102.8 → 5.102.9 Dependent
@tanstack/preact-query-devtools 5.102.8 → 5.102.9 Dependent
@tanstack/preact-query-persist-client 5.102.8 → 5.102.9 Dependent
@tanstack/query-async-storage-persister 5.102.8 → 5.102.9 Dependent
@tanstack/query-broadcast-client-experimental 5.102.8 → 5.102.9 Dependent
@tanstack/query-devtools 5.102.8 → 5.102.9 Dependent
@tanstack/query-persist-client-core 5.102.8 → 5.102.9 Dependent
@tanstack/query-sync-storage-persister 5.102.8 → 5.102.9 Dependent
@tanstack/react-query 5.102.8 → 5.102.9 Dependent
@tanstack/react-query-devtools 5.102.8 → 5.102.9 Dependent
@tanstack/react-query-next-experimental 5.102.8 → 5.102.9 Dependent
@tanstack/react-query-persist-client 5.102.8 → 5.102.9 Dependent
@tanstack/solid-query 5.102.8 → 5.102.9 Dependent
@tanstack/solid-query-devtools 5.102.8 → 5.102.9 Dependent
@tanstack/solid-query-persist-client 5.102.8 → 5.102.9 Dependent
@tanstack/svelte-query 6.1.48 → 6.1.49 Dependent
@tanstack/svelte-query-devtools 6.1.48 → 6.1.49 Dependent
@tanstack/svelte-query-persist-client 6.1.48 → 6.1.49 Dependent
@tanstack/vue-query 5.102.8 → 5.102.9 Dependent
@tanstack/vue-query-devtools 6.1.48 → 6.1.49 Dependent

@pkg-pr-new

pkg-pr-new Bot commented Aug 31, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/lit-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: 0e8ab8f

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.87 KB (0%)
react minimal 8.84 KB (0%)

@sukvvon sukvvon self-assigned this Aug 31, 2026
@sukvvon
sukvvon merged commit 6a73223 into main Aug 31, 2026
9 checks passed
@sukvvon
sukvvon deleted the docs/preact-query-usequery-useinfinitequery-hover-prefetch-example branch August 31, 2026 00:39
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