Skip to content

Conversation

vankhoawin
Copy link
Contributor

continuing off of #122, reset should also reset the error state as well.

@vankhoawin vankhoawin changed the title Use mutation revise reset and add readme reset error state when calling useMutation's reset Feb 17, 2020
@size-plugin
Copy link
Contributor

size-plugin bot commented Feb 17, 2020

Size report for the changes in this PR:

sizes-cjs Overall size: 7.32 kB (+5 B)

 index.js ⏤  7.32 kB (+5 B)

sizes-es Overall size: 7.18 kB (+4 B)

 index.es.js ⏤  7.18 kB (+4 B)

commit: a0a7c44

like it?

⭐️ me 😊

@@ -12,6 +12,7 @@

- Added the `useMutation.throwOnError` and corresponding `queryConfig.throwOnError` option to configure whether the `mutate` function rethrows errors encountered in the mutation function
- Added the `useMutation.useErrorBoundary` and corresponding `queryConfig.useErrorBoundary` option to configure whether mutation errors should be thrown during the render function and propagated to the nearest error boundary. This option will default to the same value as `queryConfig.suspense` if not defined otherwise
- Added a new `reset` function for `useMutation` which will revert the hook's state back to the initial `null` state
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I believe this got merged as v0.3.26 in 3a8bda8, this would be more of a feature in semver terms. Let me know if you want me to move this to the v0.3.26 section

@tannerlinsley tannerlinsley merged commit bfca612 into TanStack:master Feb 17, 2020
@vankhoawin vankhoawin deleted the use-mutation-revise-reset-and-add-readme branch February 17, 2020 20:41
Copy link

nx-cloud bot commented Apr 15, 2024

View your CI Pipeline Execution ↗ for commit a0a7c44.

Command Status Duration Result
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 11s View ↗
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-04-14 01:56:57 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants