feat(preact-query): support placeholder data in Suspense hooks #12687
🎯 Changes#
Add the placeholderData support already available in React to Preact's useSuspenseQuery, useSuspenseInfiniteQuery, and useSuspenseQueries. When placeholder data exists, the hooks render it and fetch in the background. Results expose isPlaceholderData and keep defined data.
React and Preact tests, type checks, lint, and builds passed locally.
✅ 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 have followed the AI contribution policy and 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).
- 1
Important
Review skipped#
Auto reviews are disabled on base/target branches other than the default branch.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand. Run configuration-
- Source mode: Auto
- Repository: TanStack/query
- Branch: tkdodo/feat/preact-suspense-placeholder-data
- File: .coderabbit.yaml
- Commit: c59a5c2
- Layers: Repository YAML
- Review profile: CHILL
- Plan: Advanced
- Run ID:
915a6783-d6f7-4026-845d-08c68e791458
You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
- Trigger review
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
-
tanstack-source added labelsfeature
View your CI Pipeline Execution ↗ for commit c59a5c2a27317c621665c7223aea7ff1c12f19fc
Command Status Duration Result nx affected --targets=test:sherif,test:knip,tes...✅ Succeeded 4m 16s View ↗ nx run-many --target=build --exclude=examples/*...✅ Succeeded <1s View ↗
☁️ Nx Cloud last updated this comment at
2026-11-23 13:29:29UTCTkDodo merged this18d4e18
TkDodo closed this
size-limit report 📦#
Path Size react full 12.37 KB (0%) react minimal 8.19 KB (0%) 🚀 Changeset Version Preview#
23 package(s) bumped directly, 2 bumped as dependents.
🟥 Major bumps#
Package Version Reason @tanstack/angular-query5.108.3 → 6.0.0 Changeset @tanstack/angular-query-devtools5.108.3 → 6.0.0 Changeset @tanstack/eslint-plugin-query5.108.3 → 6.0.0 Changeset @tanstack/lit-query0.2.43 → 1.0.0 Changeset @tanstack/preact-query5.108.3 → 6.0.0 Changeset @tanstack/preact-query-devtools5.108.3 → 6.0.0 Changeset @tanstack/preact-query-persist-client5.108.3 → 6.0.0 Changeset @tanstack/query-async-storage-persister5.108.3 → 6.0.0 Changeset @tanstack/query-broadcast-client-experimental5.108.3 → 6.0.0 Changeset @tanstack/query-core5.108.3 → 6.0.0 Changeset @tanstack/query-devtools5.108.3 → 6.0.0 Changeset @tanstack/query-persist-client-core5.108.3 → 6.0.0 Changeset @tanstack/react-query5.108.3 → 6.0.0 Changeset @tanstack/react-query-devtools5.108.3 → 6.0.0 Changeset @tanstack/react-query-next-experimental5.108.3 → 6.0.0 Changeset @tanstack/react-query-persist-client5.108.3 → 6.0.0 Changeset @tanstack/solid-query5.108.3 → 6.0.0 Changeset @tanstack/solid-query-devtools5.108.3 → 6.0.0 Changeset @tanstack/solid-query-persist-client5.108.3 → 6.0.0 Changeset @tanstack/svelte-query6.4.6 → 7.0.0 Changeset @tanstack/svelte-query-devtools6.4.6 → 7.0.0 Changeset @tanstack/vue-query5.108.3 → 6.0.0 Changeset @tanstack/vue-query-devtools6.4.6 → 7.0.0 Changeset @tanstack/angular-query-persist-client5.108.3 → 6.0.0 Dependent @tanstack/svelte-query-persist-client6.4.6 → 7.0.0 Dependent
Sign in to join this conversation.
⚠️ No Changeset found#
Latest commit: c59a5c2a27317c621665c7223aea7ff1c12f19fc
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes changesets to release 25 packages
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR