-
Notifications
You must be signed in to change notification settings - Fork 118
Update mutation.md & JSDocs documentation for API changes #743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update mutation.md & JSDocs documentation for API changes #743
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: |
|
Size Change: 0 B Total Size: 77.6 kB ℹ️ View Unchanged
|
|
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().
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