How to get a non-undefined initial pageParam when using useInfiniteQuery #1943
-
Hello, Not well-versed in typescript so I've been having a hard time trying to figure out how to get a non-undefined initial pageParam returned from data when using useInfiniteQuery. I've seen this on line 97 in the useInfiniteQuery.test.tsx file , and am wordering if it's even possible to get a pageParam that is not undefined for the first return. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This was answered in the discord by @TkDodo my codesandbox example is here: https://codesandbox.io/s/boring-resonance-rwito
|
Beta Was this translation helpful? Give feedback.
This was answered in the discord by @TkDodo
my codesandbox example is here: https://codesandbox.io/s/boring-resonance-rwito
and the answer is