Skip to content
Source
Sign inSign up
TanStack/query

refactor(query-core)!: make notifyOnChangeProps static #12689

MergedTkDodomerged 3 commits intoquery-v6 fromrefs/pull/12689/headmerged by TkDodo View on GitHub

TkDodocommented

🎯 Changes

Query v6 uses property reads as the default for adapters that track them. Manual lists can fall out of sync with those reads. Limit notifyOnChangeProps to two static values.

  • Keep 'all' for notifications on every result change.
  • Use 'none' in place of []. The query can still fetch and update its result. Error changes still notify listeners when throwOnError is set.
  • Remove manual lists and callbacks. Update the prefetch guides and add migration notes in the changeset.

Verification

The library suites passed for query-core and all seven adapters. Local Size Limit passed with +1 Brotli byte (+0.01%) for React full and −5 bytes (−0.06%) for React minimal. Preview CI is pending.

✅ 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. Pushed4a0e0d9

    2. TkDodo merged thisca8accd

    3. TkDodo closed this

Sign in to join this conversation.