Update mutation.md & JSDocs documentation for API changes#743
Merged
KyleAMathews merged 2 commits intomainfrom Nov 3, 2025
Merged
Conversation
Fixed the paced mutations documentation to reflect the final API from PR #704: - Updated all examples to use the onMutate callback pattern - Changed mutate() to accept variables directly instead of callbacks - Added comprehensive explanation of unique queues per hook instance - Clarified that each usePacedMutations() and createPacedMutations() call creates its own independent queue - Provided examples showing how to share queues across components for use cases like email draft auto-save This addresses the common confusion about whether mutations from different places share the same debounce/queue - they only do if you explicitly share the same instance.
|
More templates
@tanstack/angular-db
@tanstack/db
@tanstack/db-ivm
@tanstack/electric-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
Contributor
|
Size Change: 0 B Total Size: 77.6 kB ℹ️ View Unchanged
|
Contributor
|
Size Change: 0 B Total Size: 2.89 kB ℹ️ View Unchanged
|
Updated JSDoc comments to match the final paced mutations API:
- debounceStrategy: Changed useSerializedTransaction to usePacedMutations and added onMutate example
- throttleStrategy: Changed useSerializedTransaction to usePacedMutations and added onMutate examples
- createPacedMutations: Fixed mutationFn signature - it only receives { transaction }, not the variables
The mutationFn only receives transaction params, while onMutate receives the variables passed to mutate().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed the paced mutations documentation to reflect the final API from PR #704:
This addresses the common confusion about whether mutations from different places share the same debounce/queue - they only do if you explicitly share the same instance.
🎯 Changes
✅ Checklist
pnpm test:pr.🚀 Release Impact