skipToken combined with the new tanstack query options
I am trying to prefetch the next x pages in a table, but i have some logic to determine whether or not this should happen.
I used to use skipToken for this, with the old tanstack query package, and it seemed to sort of working.
I tried changing the code to fit the new react query package, but it instead of skipping it now runs the API call without any options.
2 Replies
For what its worth i also tried using enabled: false/true as the second arg send to queryOptions
This might be a bug, skipToken should automatically disable the query I believe
We do have a test around this but I'll flesh it out a little more
Okay I think I've got it, thanks for the report
Will be fixed in the next release