Replies: 1 comment 2 replies
-
After a closer look, I think I'm using the wrong functions. I do notice I still need to bind 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
Uh oh!
There was an error while loading. Please reload this page.
-
I'm rewriting some library "X" from mobx to react-query and integrating this in a large codebase "Y".
Due to the complexity of the large codebase "Y" I would prefer to not refactor all the code of "Y". Therefore I'm trying out some kind of bridge, using a mobx store that will fetch queries. I got some basic things working and found out some things about
fetchInfiniteQuery
already. Like the queryFn won't have the argumentclient
defined, which is does have when usinguseInfiniteQuery
. This can be solved by wrapping the query, callingqueryFn
with theclient
myself. This seems to work.I'm however, very confused on how to fetch next pages. First, I thought this might be solved by passing in the
pageParam
just like I used to do forclient
. But this doesn't seem to work. Is there any documentation available for these cases?Before calling
fetchInfiniteQuery
I run the query through this function:Example:
The problem here is that the second page is not fetched, I don't see a network request and I don't see any error/warning.
Beta Was this translation helpful? Give feedback.
All reactions