How to mock a client with React Suspense enabled? #3374
Answered
by
JoviDeCroock
sheldonbaker
asked this question in
Q&A
-
The docs suggest using the following as a mock client:
My issue is that I have some React components, however, that depend upon a client with |
Beta Was this translation helpful? Give feedback.
Answered by
JoviDeCroock
Sep 7, 2023
Replies: 1 comment 4 replies
-
Why do you need a client with |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We currently don't have a great answer to this, the way I would do it is by probably having a real client in there with the
executeExchange
similar to how we do our E2E tests 😅 https://github.com/urql-graphql/urql/blob/main/packages/react-urql/e2e-tests/useQuery.spec.tsx#L73 thedelayExchange
here simulates going from loading to not-loading.I will check whether there is more we can do to help you out here