useSuspenseQueries noncontinuous suspense
Hello everyone,
I am not sure, maybe I misunderstand
Given the code:
I would expect that clicking on the button will put my app in a suspended state and
However, after clicking on the button, I briefly get a
https://codesandbox.io/p/sandbox/friendly-jang-gjp9p8
I could deal with it using
Any help, or if I have to deal with it using undefined checks - explanation why, will be appreciated.
I am not sure, maybe I misunderstand
combine, but I notice some strange behaviour when I use it in useSuspenseQueries. Given the code:
I would expect that clicking on the button will put my app in a suspended state and
testQueriesIds will equal to [3, 4, 5, 6] after suspense is done.However, after clicking on the button, I briefly get a
[3, 4, undefined, undefined] before I get the actual result.https://codesandbox.io/p/sandbox/friendly-jang-gjp9p8
I could deal with it using
filter(Boolean) in combine but it does not fully satisfy me to do checks for undefined results each time I combine queries.Any help, or if I have to deal with it using undefined checks - explanation why, will be appreciated.