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.
5 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
Any update on this one as the skiptoken still doesnt seem to work for me. Setting enabled to false does, but I'd like to understand recommended practice as this seems to differ to the previous docs, ty!
This particular issue should be fixed, if you can reproduce a bug though please open a github issue with an example 🙂
ok thanks, it doesnt appear fixed for me, I'll try and do a minimal repro