Skip to content
Discussion options

You must be logged in to vote

Hi 👋

No, this is not safe. It might work but can lead to subtle bugs, similar to mutable React state updates. Cache updates must be made immutably.

Please see: https://tanstack.com/query/v4/docs/react/guides/updates-from-mutation-responses#immutability

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by louis-young
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants