Skip to content

Commit

Permalink
clarification for mutationHookOptions.ignoreResults in the docs (#12132)
Browse files Browse the repository at this point in the history
Co-authored-by: Naman Dhingra <[email protected]>
  • Loading branch information
naman1608 and Naman Dhingra authored Nov 18, 2024
1 parent 9d6c306 commit 1e0d47d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/react/types/types.documentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,16 @@ export interface MutationOptionsDocumentation {
*/
onError: unknown;
/**
* If `true`, the mutation's `data` property is not updated with the mutation's result.
* If `true`:
*
* - The initial state update (setting loading to true) is skipped
* - The success state update (setting data and setting loading to false) is skipped
* - Error updates will still occur
*
* The default value is `false`.
*
* This option is useful when you want to execute a mutation but don't need to track its progress or result in the UI, potentially improving performance by reducing re-renders.
*
* @docGroup 1. Operation options
*/
ignoreResults: unknown;
Expand Down

0 comments on commit 1e0d47d

Please sign in to comment.