Skip to content
Source
Sign inSign up
TanStack/pacer

fix(adapters): Use the latest committed unmount callback #278

OpenKevinVandywants to merge 4 commits intomain fromfeat-194-latest-unmountopened

KevinVandycommented

🎯 Changes

  • Use the latest committed onUnmount callback in all ten React base hooks and all ten Preact base hooks. Removing a callback restores the existing cancel, stop, or abort cleanup; changing it does not trigger teardown.
  • Share a private cleanup helper in each adapter. Commit-time ref updates prevent a suspended React render from replacing the active callback. Callback and value helpers inherit the fix.
  • Add 190 runtime cases for callback changes, provider precedence, active-work cleanup, StrictMode, and suspended renders. pnpm test and pnpm run test:pr pass all 330 tasks, with matching ReactDOM test dependencies and patch changesets. A fresh frozen install verifies the complete React Store peer dependency lock entry.

Builds on @gwagjiug's diagnosis and ref approach in #194, extending its four hook implementations to all twenty. Contributor credit is included in the commit.

✅ 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).
    1. 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
      • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Autopilot is currently an internal CodeRabbit preview.


      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.
    2. github-actions[bot](GitHub profile, opens in a new tab)commented

      🚀 Changeset Version Preview

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

      🟩 Patch bumps

      PackageVersionReason
      @tanstack/preact-pacer0.24.0 → 0.24.1Changeset
      @tanstack/react-pacer0.24.0 → 0.24.1Changeset
    3. nx-cloud[bot](GitHub profile, opens in a new tab)commented

      View your CI Pipeline Execution ↗ for commit 68700294d418e24961ab7377af63c77b2112d4d6

      CommandStatusDurationResult
      nx run-many --targets=build --exclude=examples/**✅ Succeeded<1sView ↗

      ☁️ Nx Cloud last updated this comment at 2026-09-30 20:25:25 UTC

    4. pkg-pr-new[bot](GitHub profile, opens in a new tab)commented
      More templates

      @tanstack/angular-pacer

      npm i https://pkg.pr.new/@tanstack/angular-pacer@278

      @tanstack/pacer

      npm i https://pkg.pr.new/@tanstack/pacer@278

      @tanstack/pacer-devtools

      npm i https://pkg.pr.new/@tanstack/pacer-devtools@278

      @tanstack/pacer-lite

      npm i https://pkg.pr.new/@tanstack/pacer-lite@278

      @tanstack/preact-pacer

      npm i https://pkg.pr.new/@tanstack/preact-pacer@278

      @tanstack/preact-pacer-devtools

      npm i https://pkg.pr.new/@tanstack/preact-pacer-devtools@278

      @tanstack/react-pacer

      npm i https://pkg.pr.new/@tanstack/react-pacer@278

      @tanstack/react-pacer-devtools

      npm i https://pkg.pr.new/@tanstack/react-pacer-devtools@278

      @tanstack/solid-pacer

      npm i https://pkg.pr.new/@tanstack/solid-pacer@278

      @tanstack/solid-pacer-devtools

      npm i https://pkg.pr.new/@tanstack/solid-pacer-devtools@278

      commit: 9f73394

Sign in to join this conversation.