Skip to content
Discussion options

You must be logged in to vote

It appears to be related to tracked-properties.

{...omit(query, 'data')} looks like it is accessing all properties in the query result under the hood (check _.omit), which will make react-query think that you need to track all properties, such as dataUpdatedAt, isFetching, etc.

When you call queryClient.setQueryData(), it will also update the dataUpdatedAt, thus triggering an outer component re-render.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@githorse
Comment options

@TkDodo
Comment options

Answer selected by githorse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants