fetchMore
is easy to use wrong
#1333
Unanswered
humancatfood
asked this question in
General
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I have just submitted a PR at work that uses infinite-query.
One of the first comments I got back was that, instead of doing
I could just do
I explained how that would override the cursor and pointed them at the documentation, but it did occur how easy it would be for a maintainer to accidentally break this by drive-by-optimisation. I don't want to clump up my code with comments warning people to not touch my callbacks.
Would it make sense to put the warning from the documentation into the inner
fetchPage
function inQuery.startInfiniteFetch
?Beta Was this translation helpful? Give feedback.
All reactions