Replies: 2 comments
-
|   Sure, although you can use RTK's   |  
Beta Was this translation helpful? Give feedback.
  0 replies  
 -
|   But keep in mind that each server response is still a single cache entry isolated from all other cache entries. RTK Query is a document cache by nature, not a normalized cache.  |  
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Before RTKQ I was used to manually always store an "index by id" object along side the original item list for quick access instead of having to iterate through the list.
With RTKQ this doesn't feel as trivial as before because the majority of examples doesn't perform this typeof of mapping in the
transformResponsefunction.Would it make sense to save this mapping in the cached endpoint like this? Is there a better way? What I want is to make this mapping once for the cached data.
Beta Was this translation helpful? Give feedback.
All reactions