Skip to content

docs(preact-query): document functions and components with JSDoc for generated reference docs - #11204

Draft
sukvvon wants to merge 1 commit into
mainfrom
docs/preact-reference-use-react-ref
Draft

docs(preact-query): document functions and components with JSDoc for generated reference docs#11204
sukvvon wants to merge 1 commit into
mainfrom
docs/preact-reference-use-react-ref

Conversation

@sukvvon

@sukvvon sukvvon commented Aug 16, 2026

Copy link
Copy Markdown
Member

🎯 Changes

Adds JSDoc to preact-query's functions and components (useQuery, useMutation, useInfiniteQuery, useSuspenseQuery, useSuspenseInfiniteQuery, useSuspenseQueries, useQueries, useIsFetching, useIsMutating, useMutationState, usePrefetchQuery, usePrefetchInfiniteQuery, queryOptions, infiniteQueryOptions, mutationOptions, QueryClientProvider, useQueryClient, QueryErrorResetBoundary, useQueryErrorResetBoundary, HydrationBoundary) so that the TypeDoc-generated reference docs under docs/framework/preact/reference/ carry the same descriptions, parameter notes, return-value notes, and caveats that the hand-written docs/framework/react/reference/ docs already have.

Where the React reference docs describe a preact-query-owned parameter or return value (e.g. the queryClient parameter, or the Suspense-variant caveats about cancellation not working), that text is ported verbatim. Where no example existed in the React docs, examples are adapted from working code in examples/react/ (basic, auto-refetching, nextjs-app-prefetching, load-more-infinite-scroll) and translated to Preact where the pattern differs (QueryErrorResetBoundary/useQueryErrorResetBoundary use Preact's own useErrorBoundary hook instead of react-error-boundary, which has no Preact equivalent).

Options inherited from query-core (e.g. staleTime, retry, gcTime) are out of scope here — generate-docs.ts excludes query-core from the TypeDoc entry points for all four generated frameworks, so JSDoc added there wouldn't currently render on these pages regardless.

Regenerated docs/framework/preact/reference/ with pnpm run generate-docs to pick up the new JSDoc; no other framework's output changed.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

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

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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-cloud Bot commented Aug 16, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit c069283

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

☁️ Nx Cloud last updated this comment at 2026-08-24 09:17:28 UTC

@github-actions

github-actions Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@pkg-pr-new

pkg-pr-new Bot commented Aug 16, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/lit-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: c069283

@github-actions

github-actions Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.97 KB (0%)
react minimal 8.92 KB (0%)

@sukvvon
sukvvon force-pushed the docs/preact-reference-use-react-ref branch from a36b236 to 0b75856 Compare August 16, 2026 19:36
@sukvvon sukvvon self-assigned this Aug 16, 2026
@sukvvon
sukvvon force-pushed the docs/preact-reference-use-react-ref branch from df133ad to c069283 Compare August 24, 2026 09:12
@sukvvon sukvvon changed the title docs(preact-query/reference): switch to React reference reuse via 'ref:' like vue-query docs(preact-query): document functions and components with JSDoc for generated reference docs Aug 24, 2026
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