Best practices for handling normalized data and preventing duplication across multiple infinite queries #8567
Unanswered
ialwayswatching
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on React Native App, I have multiple infinite queries fetching posts from different feeds (feed, user feed, etc.). Each post contains nested data about communities, participants, and other entities that get duplicated across these feeds.
Current setup:
I can't invalidate all feeds because of losing scroll history
Example response structure:
I'm looking for recommended patterns to:
Normalize this data structure
Share entities between queries
Update shared entities efficiently
Avoid memory duplication
Has anyone implemented something like Redux Toolkit's EntityAdapter pattern with React Query? Or what's the recommended approach for this use case?
Here is my theoretical example of how it could work, what i've got while working with AI, Will it work as expected?
Beta Was this translation helpful? Give feedback.
All reactions