-
Thanks for bringing the react-query v5 especially useSuspenseQuery! When Im upgrading to v5, i noticed that useSuspenseQuery is separate form useQuery, and its said that placeholderData is not applicable to useSuspenseQuery. However, when i declare my global queryClient like this:
The useSuspenseQuery seems still take the placeholderDataConfig from the global query client.
Understand that it might work if i declare another queryClient for suspense query, but in my project I prefer to only have one queryClient to manage all queries. And a workaround i found is to manually set the placeholderData to undefined to the useSuspenseQuery.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
right, I didn't really account for having this set globally. I think we need to explicitly set query/packages/react-query/src/useSuspenseQuery.ts Lines 17 to 23 in 45ef8f8 could you PR that ? |
Beta Was this translation helpful? Give feedback.
right, I didn't really account for having this set globally. I think we need to explicitly set
placeholderData: undefined
inuseSuspenseQuery
here:query/packages/react-query/src/useSuspenseQuery.ts
Lines 17 to 23 in 45ef8f8
could you PR that ?