Replies: 2 comments
-
Hi 👋 The query hook will be scheduling re-renders as it updates its internal state (is it loading, is it fetching, do we have data, etc). Why is this problematic for you? Structural sharing will keep the referential identity of the data stable as much as it can. You might also be interested in reading this: https://tkdodo.eu/blog/react-query-render-optimizations |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for response @louis-young I will look into blog post, thank you |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
Let's say i have database and i'm planning implement real-time updates but WebSocket not available due of network problems.
I am want to get updates always latest, but keep in state without changing
useQuery() => {data}
as re-rendering happens whenuseQuery
hook changes data every timeTried bugs
Tried implement custom-hook for caching
but it's not worked
Why need?
For UI performance reason. Using
React.memo
on every component isn't what i'd wantAdditional description
There some visualization of what i'd want
Beta Was this translation helpful? Give feedback.
All reactions