Marcin Wanago

Results comments of Marcin Wanago

@fi3ework Imagine the user starts the application and sees no errors initially because it takes some time to transpile TypeScript. They might initially think that there are no errors and...

@markerikson Would it make sense to expose the latest promise in such a way?

Hi @phryneas. Let me rephrase: I would like to have a way to wait for the data from the `useQuery` hook using a promise. A good example is when a...

@phryneas I tried using `getRunningQueryThunk`, but it does not seem to solve this problem. This is because the promise is removed from the `runningQueries` as soon as it is resolved,...

Looks like the `preferCacheValue` argument to the trigger function of the lazy query solves this problem for me completely. ``` function usePosts() { const { data } = useGetPostsQuery(); const...

@markerikson Thanks for the confirmation, I appreciate it. I'll take advantage of that.

For me, using ``` const { waitFor } = renderHook(() => // ... ); ``` instead of ``` import { waitFor } from '@testing-library/react'; ``` solved the problem.

Hi @ronag How do I achieve this?