Skip to content

feat(query-core): add structuralSharing option to useQueries#10101

Open
dagstuan wants to merge 11 commits intoTanStack:mainfrom
dagstuan:main
Open

feat(query-core): add structuralSharing option to useQueries#10101
dagstuan wants to merge 11 commits intoTanStack:mainfrom
dagstuan:main

Conversation

@dagstuan
Copy link

@dagstuan dagstuan commented Feb 6, 2026

🎯 Changes

Add a structuralSharing option to useQueries/createQueries/injectQueries that allows disabling structural sharing for the combined result. When set to false, the combined result will not use replaceEqualDeep for referential stability. Defaults to true.

Full disclosure: Docs were generated by Claude, all other implementation was done without AI.

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

Summary by CodeRabbit

  • New Features

    • Added an optional structuralSharing option to useQueries across React, Vue, Svelte, Solid, Preact, and Angular — allows disabling or customizing structural sharing for combined query results (defaults to true).
    • Enabled structuralSharing support in core query logic to honor the new option.
  • Documentation

    • Updated useQueries reference to document structuralSharing and its effect on combined results.
  • Chores

    • Bumped minor versions for multiple query packages and added a changeset entry.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants