Skip to content
Source
Sign inSign up
TanStack/query

feat(preact-query): support placeholder data in Suspense hooks #12687

MergedTkDodomerged 1 commit intoquery-v6 fromrefs/pull/12687/headmerged by TkDodo View on GitHub

TkDodocommented

🎯 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. ⚠️ 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
      NameType
      @tanstack/react-queryMinor
      @tanstack/preact-queryMinor
      @tanstack/react-query-devtoolsMinor
      @tanstack/react-query-next-experimentalMinor
      @tanstack/react-query-persist-clientMinor
      @tanstack/preact-query-devtoolsMinor
      @tanstack/preact-query-persist-clientMinor
      @tanstack/angular-query-devtoolsMinor
      @tanstack/angular-query-persist-clientMinor
      @tanstack/angular-queryMinor
      @tanstack/eslint-plugin-queryMinor
      @tanstack/query-async-storage-persisterMinor
      @tanstack/query-broadcast-client-experimentalMinor
      @tanstack/query-coreMinor
      @tanstack/query-devtoolsMinor
      @tanstack/query-persist-client-coreMinor
      @tanstack/solid-query-devtoolsMinor
      @tanstack/solid-query-persist-clientMinor
      @tanstack/solid-queryMinor
      @tanstack/vue-queryMinor
      @tanstack/lit-queryPatch
      @tanstack/svelte-queryPatch
      @tanstack/svelte-query-devtoolsPatch
      @tanstack/vue-query-devtoolsPatch
      @tanstack/svelte-query-persist-clientPatch

      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

    2. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      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.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      Run configuration

      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
      • 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.

      Share

    3. tanstack-source added labelsfeature

    4. nx-cloud[bot](GitHub profile, opens in a new tab)commented

      View your CI Pipeline Execution ↗ for commit c59a5c2a27317c621665c7223aea7ff1c12f19fc

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

      ☁️ Nx Cloud last updated this comment at 2026-11-23 13:29:29 UTC

    5. TkDodo merged this18d4e18

    6. TkDodo closed this

    7. size-limit report 📦

      PathSize
      react full12.37 KB (0%)
      react minimal8.19 KB (0%)
    8. 🚀 Changeset Version Preview

      23 package(s) bumped directly, 2 bumped as dependents.

      🟥 Major bumps

      PackageVersionReason
      @tanstack/angular-query5.108.3 → 6.0.0Changeset
      @tanstack/angular-query-devtools5.108.3 → 6.0.0Changeset
      @tanstack/eslint-plugin-query5.108.3 → 6.0.0Changeset
      @tanstack/lit-query0.2.43 → 1.0.0Changeset
      @tanstack/preact-query5.108.3 → 6.0.0Changeset
      @tanstack/preact-query-devtools5.108.3 → 6.0.0Changeset
      @tanstack/preact-query-persist-client5.108.3 → 6.0.0Changeset
      @tanstack/query-async-storage-persister5.108.3 → 6.0.0Changeset
      @tanstack/query-broadcast-client-experimental5.108.3 → 6.0.0Changeset
      @tanstack/query-core5.108.3 → 6.0.0Changeset
      @tanstack/query-devtools5.108.3 → 6.0.0Changeset
      @tanstack/query-persist-client-core5.108.3 → 6.0.0Changeset
      @tanstack/react-query5.108.3 → 6.0.0Changeset
      @tanstack/react-query-devtools5.108.3 → 6.0.0Changeset
      @tanstack/react-query-next-experimental5.108.3 → 6.0.0Changeset
      @tanstack/react-query-persist-client5.108.3 → 6.0.0Changeset
      @tanstack/solid-query5.108.3 → 6.0.0Changeset
      @tanstack/solid-query-devtools5.108.3 → 6.0.0Changeset
      @tanstack/solid-query-persist-client5.108.3 → 6.0.0Changeset
      @tanstack/svelte-query6.4.6 → 7.0.0Changeset
      @tanstack/svelte-query-devtools6.4.6 → 7.0.0Changeset
      @tanstack/vue-query5.108.3 → 6.0.0Changeset
      @tanstack/vue-query-devtools6.4.6 → 7.0.0Changeset
      @tanstack/angular-query-persist-client5.108.3 → 6.0.0Dependent
      @tanstack/svelte-query-persist-client6.4.6 → 7.0.0Dependent

Sign in to join this conversation.