Skip to content
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

docs: Add example on accessing the latest data for useMutationState #7738

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

srph
Copy link
Contributor

@srph srph commented Jul 15, 2024

I just started using useMutationState, and from what I understand, it's perfect for my use-case of tracking its state and data on other subtrees of the UI. Previously, I had to introduce new contexts just to share mutation data across components. For me though, I mostly care about the latest invocation, and thought this would save time for other people. I have a hunch that this use-case is a lot more common.

I referenced this and this. I'm sure at the moment what's the best way to explain this, but figured this would be very helpful.

I do think useMutationState could be elaborated a bit further. Happy to improve based on others' inputs.

@TkDodo TkDodo merged commit 369d826 into TanStack:main Jul 15, 2024
1 check passed
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants