Replies: 1 comment 2 replies
-
I just forgot to add it to the types. It should work at runtime, because both It seems like the options of both hooks don’t both extend Ideally, we’d an a new interface that they both can extend, and that has the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In recent releases, a new
subscribed
option has been introduced foruseQuery
anduseQueries
. This addition has proven invaluable for detaching observers from the cache, particularly in React Native projects. A common use case arises in stack navigators, where new screens are pushed onto the stack but previous ones remain mounted. Thesubscribed
option effectively prevents unnecessary observers in such scenarios, improving performance and resource management.However, I noticed that the
useInfiniteQuery
hook doesn’t seem to support this option. Is there a specific reason for this omission, or has it simply been overlooked? If there are technical or design considerations behind this decision, I’d love to understand them. Alternatively, could addingsubscribed
touseInfiniteQuery
be considered for future updates?Beta Was this translation helpful? Give feedback.
All reactions