Replies: 1 comment 3 replies
-
Can you show what your code looks like?
https://redux.js.org/tutorials/essentials/part-8-rtk-query-advanced#selecting-values-from-results |
Beta Was this translation helpful? Give feedback.
3 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.
Uh oh!
There was an error while loading. Please reload this page.
-
I recently reworked my code so I am no longer keeping my own state in the store, trying to make it stay in sync with RTKQ. What I liked about it was being able to use useSelector which has an equaity check. I am now using selectfromresult to call the query cache. The problem is I am polling the actual query every 10 seconds (its a game) and the selectfromresult is firing everytime even though it has the same results. Is there a way i can use something like lodash isEqual with selectfromresult to prevent rerenders? Is there a different method to prevent rerenders? Thanks! Oh and RTK is awesome!
Beta Was this translation helpful? Give feedback.
All reactions