Query context hook changes and triggers rerender of my component
I'm hooking up react-query into a new app. I have the query client/provider configured as explained in the tutorial:
Inside of the ViewLogs component I have a query for some mock data. It relies on some treeNode state so I have that configured correctly in the cache and
I noticed that this query sometimes re-fetches the data when I'm using other parts of the app. Not changing window focus etc.
Debugging this, I see that even when the tree node data hasn't changed, the entire ViewLogs component rerenders. I used react-dev-tools to see why it says "because hook 12 changed" and hook 12 is some part of react-query (see pic). That hook is internal to react-query so I'm not sure what could be triggering that.
Inside of the ViewLogs component I have a query for some mock data. It relies on some treeNode state so I have that configured correctly in the cache and
enabled config option.I noticed that this query sometimes re-fetches the data when I'm using other parts of the app. Not changing window focus etc.
Debugging this, I see that even when the tree node data hasn't changed, the entire ViewLogs component rerenders. I used react-dev-tools to see why it says "because hook 12 changed" and hook 12 is some part of react-query (see pic). That hook is internal to react-query so I'm not sure what could be triggering that.
