Skip to content

docs(preact-query/reference): switch to React reference reuse via 'ref:' like vue-query - #11204

Draft
sukvvon wants to merge 2 commits into
mainfrom
docs/preact-reference-use-react-ref
Draft

docs(preact-query/reference): switch to React reference reuse via 'ref:' like vue-query#11204
sukvvon wants to merge 2 commits into
mainfrom
docs/preact-reference-use-react-ref

Conversation

@sukvvon

@sukvvon sukvvon commented Aug 16, 2026

Copy link
Copy Markdown
Member

🎯 Changes

Switches docs/framework/preact/reference/* from TypeDoc-generated output to manually-authored files that ref: the existing React reference docs, the same mechanism vue-query already uses.

Depends on #11205 (removes preact-query from scripts/generate-docs.ts's TypeDoc generation targets) — that PR must merge first, otherwise the next generate-docs run would overwrite these manually-authored files with TypeDoc output again.

  • Deletes the 65 previously auto-generated files under docs/framework/preact/reference/ (functions/, interfaces/, type-aliases/, variables/, index.md).
  • Adds 20 flat .md files, each with ref: docs/framework/react/reference/{name}.md and replace: { '@tanstack/react-query': '@tanstack/preact-query' }, matching vue-query's convention.
  • useInfiniteQuery.md additionally wraps the React-only React.use() line with the existing [//]: # 'ReactUse' marker (same marker introduced for vue-query in docs(vue-query/reference): hide React-only 'React.use()' mention from useInfiniteQuery #11203), so it's excluded from the Preact page.
  • QueryErrorResetBoundary.md and useQueryErrorResetBoundary.md wrap their react-error-boundary example (a React-ecosystem package requiring react as a peer dependency) in a new [//]: # 'ReactErrorBoundaryExample' marker in the React source, and the Preact pages fill that region with an equivalent example built on Preact's own useErrorBoundary hook composed with reset. Both replacement examples were verified against preact-query's own test setup (renderWithClient, fake timers) before being written into the docs.
  • Updates docs/config.json so the Preact API Reference sidebar entries point at the new flat paths instead of functions/*, and removes the now-unused index entry.

Verified: all 20 to paths in docs/config.json resolve to existing files (no dead links), pnpm run generate-docs runs cleanly without touching Preact, and each converted page's function signature matches the corresponding React source exactly except for one pre-existing, non-visible difference in children prop typing.

✅ 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

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8fb71cbb-8f1e-4e94-9bc0-5f7d0c6810f8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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 8bd5971

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

☁️ Nx Cloud last updated this comment at 2026-08-17 03:21:34 UTC

@github-actions

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: 8bd5971

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 12.15 KB (0%)
react minimal 9.1 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
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