Hangs in Vitest when using RTK Query lazy functions with other React hooks
rokiyama opened this issue · 1 comments
rokiyama commented
I've encountered an issue where using a lazy query function created with RTK Query alongside other hook functions causes Vitest to hang. This situation arises when I write a useCallback
that depends on both the lazy query function and another custom hook function. Here is a simplified example that reproduces the issue:
Environment:
- Node v20.11.1
- @reduxjs/toolkit@2.2.2
- react-redux@9.1.0
- vite@5.2.6
- vitest@1.4.0
I have created a minimal repository to reproduce this issue: https://github.com/rokiyama/example-vite-with-redux/blob/main/src/hang.test.tsx
I am unsure if this should be reported to the Vitest repository instead. Any guidance or help in resolving this issue would be greatly appreciated.
rokiyama commented
misused, closing